summaryrefslogtreecommitdiff
path: root/dw/layout.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-03-01 21:26:25 +0100
committerSebastian Geerken <devnull@localhost>2014-03-01 21:26:25 +0100
commit975ba73389d2de0cd2bb50183bd988eab6ba0e06 (patch)
tree67947a7e22dd049685dc034223c212e2ae14c902 /dw/layout.cc
parent6369c18d186d52f0f3f5082ff6c9fdcf5c9285d1 (diff)
parent8818cda9ca4e4c19c4c5fcee68460d5ba0cd5ba2 (diff)
Merge with main repo.
Diffstat (limited to 'dw/layout.cc')
-rw-r--r--dw/layout.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/dw/layout.cc b/dw/layout.cc
index e7516972..58b30fb3 100644
--- a/dw/layout.cc
+++ b/dw/layout.cc
@@ -88,7 +88,7 @@ void Layout::LayoutImgRenderer::draw (int x, int y, int width, int height)
{
layout->queueDraw (x, y, width, height);
}
-
+
// ----------------------------------------------------------------------
void Layout::Receiver::canvasSizeChanged (int width, int ascent, int descent)
@@ -319,6 +319,8 @@ Layout::~Layout ()
delete view;
delete anchorsTable;
delete textZone;
+
+ DBG_OBJ_DELETE ();
}
void Layout::addWidget (Widget *widget)
@@ -770,10 +772,10 @@ void Layout::setBgImage (style::StyleImage *bgImage,
if (bgImage)
bgImage->ref ();
-
+
if (this->bgImage)
this->bgImage->unref ();
-
+
this->bgImage = bgImage;
this->bgRepeat = bgRepeat;
this->bgAttachment = bgAttachment;
@@ -831,7 +833,7 @@ void Layout::resizeIdle ()
// Reset already here, since in this function, queueResize() may be
// called again.
resizeIdleId = -1;
-
+
if (topLevel) {
Requisition requisition;
Allocation allocation;
@@ -851,21 +853,21 @@ void Layout::resizeIdle ()
allocation.ascent = requisition.ascent;
allocation.descent = requisition.descent;
topLevel->sizeAllocate (&allocation);
-
+
canvasWidth = requisition.width;
canvasAscent = requisition.ascent;
canvasDescent = requisition.descent;
-
+
emitter.emitCanvasSizeChanged (canvasWidth, canvasAscent, canvasDescent);
-
+
// Tell the view about the new world size.
view->setCanvasSize (canvasWidth, canvasAscent, canvasDescent);
// view->queueDrawTotal (false);
-
+
if (usesViewport) {
int currHThickness = currHScrollbarThickness();
int currVThickness = currVScrollbarThickness();
-
+
if (!canvasHeightGreater &&
canvasAscent + canvasDescent
> viewportHeight - currHThickness) {
@@ -873,7 +875,7 @@ void Layout::resizeIdle ()
setSizeHints ();
/* May queue a new resize. */
}
-
+
// Set viewport sizes.
view->setViewportSize (viewportWidth, viewportHeight,
currHThickness, currVThickness);