[gtkmm] Demo: Don't pass padding to Box::pack_start().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtkmm] Demo: Don't pass padding to Box::pack_start().
- Date: Thu, 27 Apr 2017 10:23:30 +0000 (UTC)
commit 432f914acca1c700d7eb1cdb2b1d683a4a769629
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Apr 27 11:48:35 2017 +0200
    Demo: Don't pass padding to Box::pack_start().
    
    The parameter was removed from the gtkmm API in this commit:
    https://git.gnome.org/browse/gtkmm/commit/gtk/src/box.hg?id=a53eea323ab9f9b3d228d72c6c13998b73f58ab3
    in response to this GTK+ API change:
    https://git.gnome.org/browse/gtk+/commit/?id=f45dadadd00d892ba16dc081240987425bc32346
    but the compiler was implicitly converting the enum and the int to bool,
    bool, to call pack_start(widget, bool, bool) instead, which is not what
    was wanted.
    I have made changes to the demo code to match the C commit above, more or less, though
    they don't make much sense.
 demos/gtk-demo/example_buttonbox.cc |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/demos/gtk-demo/example_buttonbox.cc b/demos/gtk-demo/example_buttonbox.cc
index 38531fd..8cdd44a 100644
--- a/demos/gtk-demo/example_buttonbox.cc
+++ b/demos/gtk-demo/example_buttonbox.cc
@@ -42,7 +42,9 @@ Example_ButtonBox::Example_ButtonBox()
 
   m_Frame_Horizontal.set_margin_top(10);
   m_Frame_Horizontal.set_margin_bottom(10);
-  m_VBox_Main.pack_start(m_Frame_Horizontal, Gtk::PACK_EXPAND_WIDGET, 10);
+  m_VBox_Main.pack_start(m_Frame_Horizontal, Gtk::PACK_EXPAND_WIDGET);
+  m_Frame_Horizontal.set_margin_top(10);
+  m_Frame_Horizontal.set_margin_bottom(10);
 
   m_VBox.property_margin() = 10;
   m_Frame_Horizontal.add(m_VBox);
@@ -52,7 +54,7 @@ Example_ButtonBox::Example_ButtonBox()
   m_VBox.pack_start( *(create_button_box(true, "Start", 40, Gtk::ButtonBoxStyle::START)) );
   m_VBox.pack_start( *(create_button_box(true, "End", 40, Gtk::ButtonBoxStyle::END)) );
 
-  m_VBox_Main.pack_start(m_Frame_Vertical, Gtk::PACK_EXPAND_WIDGET, 10);
+  m_VBox_Main.pack_start(m_Frame_Vertical, Gtk::PACK_EXPAND_WIDGET);
 
   m_HBox.property_margin() = 10;
   m_Frame_Vertical.add(m_HBox);
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]