summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/layers.cpp52
-rw-r--r--src/ui/dialog/layers.h9
2 files changed, 28 insertions, 33 deletions
diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp
index 55a2f19a5..f851f72c1 100644
--- a/src/ui/dialog/layers.cpp
+++ b/src/ui/dialog/layers.cpp
@@ -838,43 +838,34 @@ LayersPanel::LayersPanel() :
SPDesktop* targetDesktop = getDesktop();
-#if !WITH_GTKMM_3_0
- // TODO: This has been removed from Gtkmm 3.0. Check that everything still
- // looks OK!
- _buttonsRow.set_child_min_width( 16 );
-#endif
-
- _buttonsRow.set_layout (Gtk::BUTTONBOX_END);
-
Gtk::Button* btn = manage( new Gtk::Button() );
_styleButton( *btn, targetDesktop, SP_VERB_LAYER_NEW, GTK_STOCK_ADD, C_("Layers", "New") );
btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_NEW) );
- _buttonsRow.add( *btn );
- _buttonsRow.set_child_secondary( *btn , true);
-
- btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_TO_TOP, GTK_STOCK_GOTO_TOP, C_("Layers", "Top") );
- btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_TOP) );
- _watchingNonTop.push_back( btn );
- _buttonsRow.add( *btn );
+ _buttonsSecondary.pack_start(*btn, Gtk::PACK_SHRINK);
btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_RAISE, GTK_STOCK_GO_UP, C_("Layers", "Up") );
- btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_UP) );
- _watchingNonTop.push_back( btn );
- _buttonsRow.add( *btn );
-
+ _styleButton( *btn, targetDesktop, SP_VERB_LAYER_TO_BOTTOM, GTK_STOCK_GOTO_BOTTOM, C_("Layers", "Bot") );
+ btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_BOTTOM) );
+ _watchingNonBottom.push_back( btn );
+ _buttonsPrimary.pack_end(*btn, Gtk::PACK_SHRINK);
+
btn = manage( new Gtk::Button() );
_styleButton( *btn, targetDesktop, SP_VERB_LAYER_LOWER, GTK_STOCK_GO_DOWN, C_("Layers", "Dn") );
btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_DOWN) );
_watchingNonBottom.push_back( btn );
- _buttonsRow.add( *btn );
-
+ _buttonsPrimary.pack_end(*btn, Gtk::PACK_SHRINK);
+
btn = manage( new Gtk::Button() );
- _styleButton( *btn, targetDesktop, SP_VERB_LAYER_TO_BOTTOM, GTK_STOCK_GOTO_BOTTOM, C_("Layers", "Bot") );
- btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_BOTTOM) );
- _watchingNonBottom.push_back( btn );
- _buttonsRow.add( *btn );
+ _styleButton( *btn, targetDesktop, SP_VERB_LAYER_RAISE, GTK_STOCK_GO_UP, C_("Layers", "Up") );
+ btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_UP) );
+ _watchingNonTop.push_back( btn );
+ _buttonsPrimary.pack_end(*btn, Gtk::PACK_SHRINK);
+
+ btn = manage( new Gtk::Button() );
+ _styleButton( *btn, targetDesktop, SP_VERB_LAYER_TO_TOP, GTK_STOCK_GOTO_TOP, C_("Layers", "Top") );
+ btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_TOP) );
+ _watchingNonTop.push_back( btn );
+ _buttonsPrimary.pack_end(*btn, Gtk::PACK_SHRINK);
// btn = manage( new Gtk::Button("Dup") );
// btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_DUPLICATE) );
@@ -884,9 +875,10 @@ LayersPanel::LayersPanel() :
_styleButton( *btn, targetDesktop, SP_VERB_LAYER_DELETE, GTK_STOCK_REMOVE, _("X") );
btn->signal_clicked().connect( sigc::bind( sigc::mem_fun(*this, &LayersPanel::_takeAction), (int)BUTTON_DELETE) );
_watching.push_back( btn );
- _buttonsRow.add( *btn );
- _buttonsRow.set_child_secondary( *btn , true);
-
+ _buttonsSecondary.pack_start(*btn, Gtk::PACK_SHRINK);
+
+ _buttonsRow.pack_start(_buttonsSecondary, Gtk::PACK_EXPAND_WIDGET);
+ _buttonsRow.pack_end(_buttonsPrimary, Gtk::PACK_EXPAND_WIDGET);
diff --git a/src/ui/dialog/layers.h b/src/ui/dialog/layers.h
index 12e5f7986..cbd9515d7 100644
--- a/src/ui/dialog/layers.h
+++ b/src/ui/dialog/layers.h
@@ -13,7 +13,6 @@
#define SEEN_LAYERS_PANEL_H
#include <gtkmm/box.h>
-#include <gtkmm/buttonbox.h>
#include <gtkmm/treeview.h>
#include <gtkmm/treestore.h>
#include <gtkmm/scrolledwindow.h>
@@ -122,9 +121,13 @@ private:
Gtk::CellRendererText *_text_renderer;
Gtk::TreeView::Column *_name_column;
#if WITH_GTKMM_3_0
- Gtk::ButtonBox _buttonsRow;
+ Gtk::Box _buttonsRow;
+ Gtk::Box _buttonsPrimary;
+ Gtk::Box _buttonsSecondary;
#else
- Gtk::HButtonBox _buttonsRow;
+ Gtk::HBox _buttonsRow;
+ Gtk::HBox _buttonsPrimary;
+ Gtk::HBox _buttonsSecondary;
#endif
Gtk::ScrolledWindow _scroller;
Gtk::Menu _popupMenu;