[gtkmm-documentation] Toolbar, Tooltips examples: Fix packing.



commit 597cbe4851a33d2ab4d5bce6df486ce1d6299bfa
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Aug 5 08:55:37 2011 +0200

    Toolbar, Tooltips examples: Fix packing.
    
    * examples/book/toolbar/examplewindow.cc:
    * examples/book/tooltips/examplewindow.cc: Make sure that non-expanding
    widgets don't expand.

 ChangeLog                               |    8 ++++++++
 examples/book/toolbar/examplewindow.cc  |    2 +-
 examples/book/tooltips/examplewindow.cc |    6 +++---
 3 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 27f91c5..789b7ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-08-05  Murray Cumming  <murrayc murrayc com>
+
+	Toolbar, Tooltips examples: Fix packing.
+
+	* examples/book/toolbar/examplewindow.cc:
+	* examples/book/tooltips/examplewindow.cc: Make sure that non-expanding 
+	widgets don't expand.
+
 2011-08-03  Murray Cumming  <murrayc murrayc com>
 
 	Simple application example: Fix a typo.
diff --git a/examples/book/toolbar/examplewindow.cc b/examples/book/toolbar/examplewindow.cc
index 990553a..2a723ae 100644
--- a/examples/book/toolbar/examplewindow.cc
+++ b/examples/book/toolbar/examplewindow.cc
@@ -33,7 +33,7 @@ ExampleWindow::ExampleWindow()
   m_VBox.pack_start(m_Toolbar, Gtk::PACK_SHRINK);
   m_ButtonBox.set_border_width(5);
   m_ButtonBox.set_layout(Gtk::BUTTONBOX_END);
-  m_VBox.pack_end(m_ButtonBox);
+  m_VBox.pack_end(m_ButtonBox, Gtk::PACK_SHRINK);
 
   m_ButtonBox.pack_start(m_Button_Close, Gtk::PACK_SHRINK);
 
diff --git a/examples/book/tooltips/examplewindow.cc b/examples/book/tooltips/examplewindow.cc
index 923c0cb..0d617b5 100644
--- a/examples/book/tooltips/examplewindow.cc
+++ b/examples/book/tooltips/examplewindow.cc
@@ -40,11 +40,11 @@ ExampleWindow::ExampleWindow()
 
   //Check button with markup in tooltip:
   m_checkbutton.set_tooltip_text(non_markedup_tip);
-  m_vbox.pack_start(m_checkbutton);
+  m_vbox.pack_start(m_checkbutton, Gtk::PACK_SHRINK);
 
   //Label:
   m_label.set_tooltip_text("Another tooltip");
-  m_vbox.pack_start(m_label);
+  m_vbox.pack_start(m_label, Gtk::PACK_SHRINK);
 
   //Textview:
   prepare_textview();
@@ -53,7 +53,7 @@ ExampleWindow::ExampleWindow()
   // set_tooltip_window(), like set_tooltip_text(),
   // will call set_has_tooltip() for us.
   m_button.set_tooltip_window(m_button_tooltip_window);
-  m_vbox.pack_start(m_button);
+  m_vbox.pack_start(m_button, Gtk::PACK_SHRINK);
 
   //Button's custom tooltip window:
   m_button_tooltip_window.set_default_size(250, 30);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]