void WPaintedWidget::resize(const WLength& width, const WLength& height) { if (!width.isAuto() && !height.isAuto()) { setLayoutSizeAware(false); resizeCanvas(static_cast<int>(width.toPixels()), static_cast<int>(height.toPixels())); } WInteractWidget::resize(width, height); }
void WProgressBar::resize(const WLength& width, const WLength& height) { WInteractWidget::resize(width, height); if (!height.isAuto()) setAttributeValue("style", "line-height: " + height.cssText()); }
void PaintedSlider::sliderResized(const WLength& width, const WLength& height) { if (slider_->orientation() == Orientation::Horizontal) { WLength w = width; if (!w.isAuto()) w = WLength(w.toPixels() - 10); resize(w, height); } else { WLength h = height; if (!h.isAuto()) h = WLength(h.toPixels() - 10); resize(width, h); } updateState(); }