[gtkmm] Box::pack_start():pack_end(options): Set expand/align for both h and v.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Box::pack_start():pack_end(options): Set expand/align for both h and v.
- Date: Fri, 28 Apr 2017 12:28:57 +0000 (UTC)
commit ece3794336e7216c4d25484be432d5d142ebab1b
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Apr 28 14:13:31 2017 +0200
Box::pack_start():pack_end(options): Set expand/align for both h and v.
Because we think that is what the old expand and fill parameters did.
gtk/src/box.ccg | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/src/box.ccg b/gtk/src/box.ccg
index 293b181..218ca43 100644
--- a/gtk/src/box.ccg
+++ b/gtk/src/box.ccg
@@ -29,7 +29,9 @@ void Box::pack_start(Widget& child, PackOptions options)
const bool fill = (options == PackOptions::EXPAND_WIDGET);
child.property_hexpand() = expand;
+ child.property_vexpand() = expand;
child.property_halign() = fill ? Gtk::Align::FILL : Gtk::Align::START;
+ child.property_valign() = fill ? Gtk::Align::FILL : Gtk::Align::START;
gtk_box_pack_start(gobj(), child.gobj());
}
@@ -40,7 +42,9 @@ void Box::pack_end(Widget& child, PackOptions options)
const bool fill = (options == PackOptions::EXPAND_WIDGET);
child.property_hexpand() = expand;
+ child.property_vexpand() = expand;
child.property_halign() = fill ? Gtk::Align::FILL : Gtk::Align::END;
+ child.property_valign() = fill ? Gtk::Align::FILL : Gtk::Align::END;
gtk_box_pack_end(gobj(), child.gobj());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]