Esempio n. 1
0
PixelSize
RowFormWidget::GetMaximumSize() const
{
  const unsigned value_width =
    look.text_font.TextSize(_T("Foo Bar Foo Bar")).cx * 2;

  const unsigned edit_width = vertical
    ? std::max(GetRecommendedCaptionWidth(), value_width)
    : (GetRecommendedCaptionWidth() + value_width);

  PixelSize size(edit_width, 0u);
  for (const auto &i : rows)
    size.cy += i.GetMaximumHeight(look, vertical);

  return size;
}
Esempio n. 2
0
PixelSize
RowFormWidget::GetMinimumSize() const
{
  const unsigned value_width =
    look.text_font.TextSize(_T("Foo Bar Foo Bar")).cx;

  const bool expert = UIGlobals::GetDialogSettings().expert;

  const unsigned edit_width = vertical
    ? std::max(GetRecommendedCaptionWidth(), value_width)
    : (GetRecommendedCaptionWidth() + value_width);

  PixelSize size(edit_width, 0u);
  for (const auto &i : rows)
    if (i.IsAvailable(expert))
      size.cy += i.GetMinimumHeight(look, vertical);

  return size;
}
Esempio n. 3
0
PixelSize
RowFormWidget::GetMaximumSize() const
{
  const unsigned value_width =
    look.text_font->TextSize(_T("Foo Bar Foo Bar")).cx * 2;

  PixelSize size(GetRecommendedCaptionWidth() + value_width, 0u);
  for (const auto &i : rows)
    size.cy += i.GetMaximumHeight();

  return size;
}
Esempio n. 4
0
PixelSize
RowFormWidget::GetMaximumSize() const
{
  const UPixelScalar value_width =
    look.text_font->TextSize(_T("Foo Bar Foo Bar")).cx * 2;

  PixelSize size{ PixelScalar(GetRecommendedCaptionWidth() + value_width), 0 };
  for (auto i = rows.begin(), end = rows.end(); i != end; ++i)
    size.cy += i->GetMaximumHeight();

  return size;
}
Esempio n. 5
0
PixelSize
RowFormWidget::GetMinimumSize() const
{
  const unsigned value_width =
    look.text_font->TextSize(_T("Foo Bar Foo Bar")).cx;

  const bool expert = UIGlobals::GetDialogSettings().expert;

  PixelSize size(GetRecommendedCaptionWidth() + value_width, 0u);
  for (const auto &i : rows)
    if (i.available && (!i.expert || expert))
      size.cy += i.GetMinimumHeight();

  return size;
}
Esempio n. 6
0
PixelSize
RowFormWidget::GetMinimumSize() const
{
  const UPixelScalar value_width =
    look.text_font->TextSize(_T("Foo Bar Foo Bar")).cx;

  const bool expert = UIGlobals::GetDialogSettings().expert;

  PixelSize size{ PixelScalar(GetRecommendedCaptionWidth() + value_width), 0 };
  for (auto i = rows.begin(), end = rows.end(); i != end; ++i)
    if (i->available && (!i->expert || expert))
      size.cy += i->GetMinimumHeight();

  return size;
}