[shotwell] Delay size_request in CheckerboardLayout
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] Delay size_request in CheckerboardLayout
- Date: Mon, 30 May 2016 15:06:20 +0000 (UTC)
commit 4a70d87baeb993c015611f71af39bdc77893ae08
Author: Jens Georg <mail jensge org>
Date: Sun May 29 22:01:11 2016 +0200
Delay size_request in CheckerboardLayout
If we do a size_request with height = 0, the size_request in do_reflow does
not lead to a re-allocation.
Signed-off-by: Jens Georg <mail jensge org>
https://bugzilla.gnome.org/show_bug.cgi?id=766864
src/CheckerboardLayout.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/CheckerboardLayout.vala b/src/CheckerboardLayout.vala
index 3221776..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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]