gcc_pure static unsigned GetMinimumHeight(const WndProperty &control, const DialogLook &look, bool vertical) { const unsigned padding = Layout::GetTextPadding(); unsigned height = look.text_font.GetHeight(); if (vertical && control.HasCaption()) height *= 2; height += padding * 2; if (!control.IsReadOnly() && height < Layout::GetMinimumControlHeight()) height = Layout::GetMinimumControlHeight(); return height; }