From dbb857df40f41a11a46622c2c561400bd029994c Mon Sep 17 00:00:00 2001 From: Sebastian Geerken Date: Fri, 30 May 2014 01:28:15 +0200 Subject: RTFL --- dw/layout.cc | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'dw/layout.cc') 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. } -- cgit v1.2.3