diff options
author | Sebastian Geerken <devnull@localhost> | 2014-05-30 01:28:15 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-05-30 01:28:15 +0200 |
commit | dbb857df40f41a11a46622c2c561400bd029994c (patch) | |
tree | 8e2b35023c2da68be486f8c5a5bacdd53d94250e /dw/layout.cc | |
parent | ba79c22372b1cb17ff42d80f9be737b0bf091ff4 (diff) |
RTFL
Diffstat (limited to 'dw/layout.cc')
-rw-r--r-- | dw/layout.cc | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/dw/layout.cc b/dw/layout.cc index d82595d8..49f65b96 100644 --- a/dw/layout.cc +++ b/dw/layout.cc @@ -277,6 +277,11 @@ Layout::Layout (Platform *platform) viewportWidth = viewportHeight = 0; hScrollbarThickness = vScrollbarThickness = 0; + DBG_OBJ_SET_NUM ("viewportWidth", viewportWidth); + DBG_OBJ_SET_NUM ("viewportHeight", viewportHeight); + DBG_OBJ_SET_NUM ("hScrollbarThickness", hScrollbarThickness); + DBG_OBJ_SET_NUM ("vScrollbarThickness", vScrollbarThickness); + requestedAnchor = NULL; scrollIdleId = -1; scrollIdleNotInterrupted = false; @@ -380,6 +385,8 @@ void Layout::addWidget (Widget *widget) findtextState.setWidget (widget); canvasHeightGreater = false; + DBG_OBJ_SET_SYM ("canvasHeightGreater", + canvasHeightGreater ? "true" : "false"); // Do not directly call Layout::queueResize(), but // Widget::queueResize(), so that all flags are set properly, @@ -473,6 +480,11 @@ void Layout::attachView (View *view) hScrollbarThickness = view->getHScrollbarThickness (); vScrollbarThickness = view->getVScrollbarThickness (); } + + DBG_OBJ_SET_NUM ("viewportWidth", viewportWidth); + DBG_OBJ_SET_NUM ("viewportHeight", viewportHeight); + DBG_OBJ_SET_NUM ("hScrollbarThickness", hScrollbarThickness); + DBG_OBJ_SET_NUM ("vScrollbarThickness", vScrollbarThickness); } /* @@ -912,6 +924,8 @@ void Layout::resizeIdle () if (!canvasHeightGreater && canvasAscent + canvasDescent > viewportHeight - currHThickness) { canvasHeightGreater = true; + DBG_OBJ_SET_SYM ("canvasHeightGreater", + canvasHeightGreater ? "true" : "false"); // TODO tell widget about change. } @@ -1259,8 +1273,11 @@ void Layout::viewportSizeChanged (View *view, int width, int height) /* If the width has become higher, we test again, whether the vertical * scrollbar (so to speak) can be hidden again. */ - if (usesViewport && width > viewportWidth) + if (usesViewport && width > viewportWidth) { canvasHeightGreater = false; + DBG_OBJ_SET_SYM ("canvasHeightGreater", + canvasHeightGreater ? "true" : "false"); + } /* if size changes, redraw this view. * TODO: this is a resize call (redraw/resize code needs a review). */ @@ -1275,6 +1292,9 @@ void Layout::viewportSizeChanged (View *view, int width, int height) viewportWidth = width; viewportHeight = height; + DBG_OBJ_SET_NUM ("viewportWidth", viewportWidth); + DBG_OBJ_SET_NUM ("viewportHeight", viewportHeight); + // TODO tell widget about change. } |