diff options
Diffstat (limited to 'dw/layout.cc')
-rw-r--r-- | dw/layout.cc | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/dw/layout.cc b/dw/layout.cc index 998878ca..c89b2868 100644 --- a/dw/layout.cc +++ b/dw/layout.cc @@ -378,7 +378,6 @@ void Layout::addWidget (Widget *widget) findtextState.setWidget (widget); canvasHeightGreater = false; - setSizeHints (); // Do not directly call Layout::queueResize(), but // Widget::queueResize(), so that all flags are set properly, @@ -909,12 +908,10 @@ void Layout::resizeIdle () int currVThickness = currVScrollbarThickness(); if (!canvasHeightGreater && - canvasAscent + canvasDescent - > viewportHeight - currHThickness) { + canvasAscent + canvasDescent > viewportHeight - currHThickness) { canvasHeightGreater = true; - setSizeHints (); - /* May queue a new resize. */ - } + // TODO tell widget about change. + } // Set viewport sizes. view->setViewportSize (viewportWidth, viewportHeight, @@ -933,16 +930,6 @@ void Layout::resizeIdle () leaveResizeIdle (); } -void Layout::setSizeHints () -{ - if (topLevel) { - topLevel->setWidth (viewportWidth - - (canvasHeightGreater ? vScrollbarThickness : 0)); - topLevel->setAscent (viewportHeight - hScrollbarThickness); - topLevel->setDescent (0); - } -} - void Layout::queueDraw (int x, int y, int width, int height) { Rectangle area; @@ -1286,7 +1273,7 @@ void Layout::viewportSizeChanged (View *view, int width, int height) viewportWidth = width; viewportHeight = height; - setSizeHints (); + // TODO tell widget about change. } } // namespace core |