diff options
author | Sebastian Geerken <devnull@localhost> | 2014-03-14 21:16:35 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-03-14 21:16:35 +0100 |
commit | 96a0181e59a9555c4953d59432e986cf23ea8bfc (patch) | |
tree | 3d9eaf3f57167d7760f9d08e4f318cb673d4c3a3 | |
parent | 3b62d68aeed5aed4cce19c22ab03e6337c07c438 (diff) |
And more RTFL.
-rw-r--r-- | dw/layout.cc | 9 | ||||
-rw-r--r-- | dw/ui.cc | 30 |
2 files changed, 38 insertions, 1 deletions
diff --git a/dw/layout.cc b/dw/layout.cc index f16cbae7..289b204b 100644 --- a/dw/layout.cc +++ b/dw/layout.cc @@ -907,7 +907,8 @@ void Layout::resizeIdle () updateAnchor (); - DBG_OBJ_MSGF ("resize", 1, "resizeIdleId = %d", resizeIdleId); + DBG_OBJ_MSGF ("resize", 1, + "after resizeIdle: resizeIdleId = %d", resizeIdleId); DBG_OBJ_MSG_END (); leaveResizeIdle (); @@ -961,11 +962,17 @@ void Layout::queueDrawExcept (int x, int y, int width, int height, void Layout::queueResize () { + DBG_OBJ_MSG ("resize", 0, "<b>queueResize</b>"); + DBG_OBJ_MSG_START (); + if (resizeIdleId == -1) { view->cancelQueueDraw (); resizeIdleId = platform->addIdle (&Layout::resizeIdle); + DBG_OBJ_MSGF ("resize", 1, "setting resizeIdleId = %d", resizeIdleId); } + + DBG_OBJ_MSG_END (); } @@ -90,17 +90,32 @@ bool Embed::buttonPressImpl (core::EventButton *event) void Embed::setWidth (int width) { + DBG_OBJ_MSGF ("resize", 0, "<b>setWidth</b> (%d)", width); + DBG_OBJ_MSG_START (); + resource->setWidth (width); + + DBG_OBJ_MSG_END (); } void Embed::setAscent (int ascent) { + DBG_OBJ_MSGF ("resize", 0, "<b>setAscent</b> (%d)", ascent); + DBG_OBJ_MSG_START (); + resource->setAscent (ascent); + + DBG_OBJ_MSG_END (); } void Embed::setDescent (int descent) { + DBG_OBJ_MSGF ("resize", 0, "<b>setDescent</b> (%d)", descent); + DBG_OBJ_MSG_START (); + resource->setDescent (descent); + + DBG_OBJ_MSG_END (); } void Embed::setDisplayed (bool displayed) @@ -353,17 +368,32 @@ void ComplexButtonResource::sizeAllocate (Allocation *allocation) void ComplexButtonResource::setWidth (int width) { + DBG_OBJ_MSGF ("resize", 0, "<b>setWidth</b> (%d)", width); + DBG_OBJ_MSG_START (); + childWidget->setWidth (width - 2 * reliefXThickness ()); + + DBG_OBJ_MSG_END (); } void ComplexButtonResource::setAscent (int ascent) { + DBG_OBJ_MSGF ("resize", 0, "<b>setAscent</b> (%d)", ascent); + DBG_OBJ_MSG_START (); + childWidget->setAscent (ascent - reliefYThickness ()); + + DBG_OBJ_MSG_END (); } void ComplexButtonResource::setDescent (int descent) { + DBG_OBJ_MSGF ("resize", 0, "<b>setDescent</b> (%d)", descent); + DBG_OBJ_MSG_START (); + childWidget->setDescent (descent - reliefYThickness ()); + + DBG_OBJ_MSG_END (); } Iterator *ComplexButtonResource::iterator (Content::Type mask, bool atEnd) |