summaryrefslogtreecommitdiff
path: root/src/CheckerboardLayout.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-06-26 08:39:49 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-06-26 08:39:49 +0200
commit29a7aef998e975b42401cfa96d1b750d91eadf06 (patch)
treeeda2bdff398789ea2358cc39986dd1f7ee9d027a /src/CheckerboardLayout.vala
parent4e10e30c2f99d552239871aa1b27a08a6c18f1a4 (diff)
Imported Upstream version 0.23.2upstream/0.23.2
Diffstat (limited to 'src/CheckerboardLayout.vala')
-rw-r--r--src/CheckerboardLayout.vala11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/CheckerboardLayout.vala b/src/CheckerboardLayout.vala
index 30f3d66..032235f 100644
--- a/src/CheckerboardLayout.vala
+++ b/src/CheckerboardLayout.vala
@@ -911,7 +911,11 @@ public class CheckerboardLayout : Gtk.DrawingArea {
debug("on_viewport_resized: due_to_reflow=%s set_size_request %dx%d",
size_allocate_due_to_reflow.to_string(), parent_allocation.width, req.height);
#endif
- set_size_request(parent_allocation.width - SCROLLBAR_PLACEHOLDER_WIDTH, req.height);
+ // But if the current height is 0, don't request a size yet. Delay
+ // it to do_reflow (bgo#766864)
+ if (req.height != 0) {
+ set_size_request(parent_allocation.width - SCROLLBAR_PLACEHOLDER_WIDTH, req.height);
+ }
} else {
// set the layout's width and height to always match the parent's
set_size_request(parent_allocation.width, parent_allocation.height);
@@ -1808,6 +1812,10 @@ public class CheckerboardLayout : Gtk.DrawingArea {
// we want switched_to() to be the final call in the process (indicating that the page is
// now in place and should do its thing to update itself), have to be be prepared for
// GTK/GDK calls between the widgets being actually present on the screen and "switched to"
+
+ Gtk.Allocation allocation;
+ get_allocation(out allocation);
+ get_style_context().render_background (ctx, 0, 0, allocation.width, allocation.height);
// watch for message mode
if (message == null) {
@@ -1829,7 +1837,6 @@ public class CheckerboardLayout : Gtk.DrawingArea {
int text_width, text_height;
pango_layout.get_pixel_size(out text_width, out text_height);
- Gtk.Allocation allocation;
get_allocation(out allocation);
int x = allocation.width - text_width;