[gtkmm-documentation] box example: Center the quit button.



commit 9e2ac0bef9712859a20b7dd351a2d3e412d7fb0f
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed May 3 13:21:10 2017 +0200

    box example: Center the quit button.
    
    To match the behaviour in the gtkmm3 version.

 examples/book/box/examplewindow.cc |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/examples/book/box/examplewindow.cc b/examples/book/box/examplewindow.cc
index 4492bc9..92c5f6a 100644
--- a/examples/book/box/examplewindow.cc
+++ b/examples/book/box/examplewindow.cc
@@ -157,6 +157,7 @@ ExampleWindow::ExampleWindow(int which)
 
   // pack the button into the quitbox.
   m_boxQuit.pack_start(m_buttonQuit, Gtk::PackOptions::EXPAND_PADDING);
+  m_buttonQuit.set_halign(Gtk::Align::CENTER);
   m_box1.pack_start(m_boxQuit, Gtk::PackOptions::SHRINK);
 
   // pack the vbox (box1) which now contains all our widgets, into the


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