Пример #1
0
gcc_pure
static unsigned
GetMaximumHeight(const WndProperty &control, const DialogLook &look,
                 bool vertical)
{
  unsigned height = GetMinimumHeight(control, look, vertical);
  if (!control.IsReadOnly() && height < Layout::GetMaximumControlHeight())
    height = Layout::GetMaximumControlHeight();

  return height;
}
Пример #2
0
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;
}