Exemplo n.º 1
0
void WDialog::setMaximumSize(const WLength& width, const WLength& height)
{
  WCompositeWidget::setMaximumSize(width, height);

  WLength w = width.unit() != WLength::Percentage ? width : WLength::Auto;
  WLength h = height.unit() != WLength::Percentage ? height : WLength::Auto;

  impl_->resolveWidget("layout")->setMaximumSize(w, h);
}
Exemplo n.º 2
0
int StdGridLayoutImpl2::pixelSize(const WLength& size)
{
  if (size.unit() == WLength::Percentage)
    return 0;
  else
    return (int)size.toPixels();
}