From 3182218af4961cfc0a92b2f1eae4cfab74e64eff Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Mon, 26 Dec 2016 12:07:14 +0000 Subject: Fix a few Gtkmm deprecations (bzr r15357) --- src/display/canvas-axonomgrid.cpp | 5 +++++ src/display/canvas-grid.cpp | 5 +++++ src/ui/widget/panel.cpp | 10 ++++------ src/ui/widget/panel.h | 4 ++-- 4 files changed, 16 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/display/canvas-axonomgrid.cpp b/src/display/canvas-axonomgrid.cpp index 421a39fbd..94ee4ccfd 100644 --- a/src/display/canvas-axonomgrid.cpp +++ b/src/display/canvas-axonomgrid.cpp @@ -107,7 +107,12 @@ attach_all(Gtk::Grid &table, Gtk::Widget const *const arr[], unsigned size, int table.attach(const_cast(*arr[i+1]), 1, r, 2, 1); } else if (arr[i]) { Gtk::Label& label = reinterpret_cast (const_cast(*arr[i])); +#if GTK_CHECK_VERSION(3,16,0) + label.set_xalign(0.0); + label.set_yalign(0.5); +#else label.set_alignment (0.0); +#endif label.set_hexpand(); label.set_valign(Gtk::ALIGN_CENTER); table.attach(label, 0, r, 3, 1); diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index 81d194b35..cf7d04555 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -413,7 +413,12 @@ static inline void attach_all(Gtk::Grid &table, Gtk::Widget const *const arr[], table.attach(const_cast(*arr[i+1]), 1, r, 2, 1); } else if (arr[i]) { Gtk::Label& label = reinterpret_cast (const_cast(*arr[i])); +#if GTK_CHECK_VERSION(3,16,0) + label.set_xalign(0.0); + label.set_yalign(0.5); +#else label.set_alignment (0.0); +#endif label.set_hexpand(); label.set_valign(Gtk::ALIGN_CENTER); table.attach(label, 0, r, 3, 1); diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp index 6e6e6c527..d2ec340c8 100644 --- a/src/ui/widget/panel.cpp +++ b/src/ui/widget/panel.cpp @@ -66,7 +66,7 @@ Panel::Panel(Glib::ustring const &label, gchar const *prefs_path, _label(label), _apply_label(apply_label), _verb_num(verb_num), - _temp_arrow(Gtk::ARROW_LEFT, Gtk::SHADOW_ETCHED_OUT), + _temp_arrow(), _menu(0), _action_area(0), _fillable(0) @@ -269,11 +269,9 @@ void Panel::_init() _top_bar.pack_end(_menu_popper, false, false); gint width = 0; gint height = 0; - - if ( gtk_icon_size_lookup( Inkscape::getRegisteredIconSize(Inkscape::ICON_SIZE_DECORATION), &width, &height ) ) { - _temp_arrow.set_size_request(width, height); - } - + gtk_image_set_from_icon_name(_temp_arrow.gobj(), + "pan-start-symbolic", + Inkscape::getRegisteredIconSize(Inkscape::ICON_SIZE_SMALL_TOOLBAR)); _menu_popper.add(_temp_arrow); _menu_popper.signal_button_press_event().connect_notify(sigc::mem_fun(*this, &Panel::_popper)); } diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h index 370779586..0ea609904 100644 --- a/src/ui/widget/panel.h +++ b/src/ui/widget/panel.h @@ -18,9 +18,9 @@ #endif #include -#include #include #include +#include #include #include "enums.h" #include @@ -157,7 +157,7 @@ private: Gtk::VBox _right_bar; Gtk::VBox _contents; Gtk::Label _tab_title; - Gtk::Arrow _temp_arrow; + Gtk::Image _temp_arrow; Gtk::EventBox _menu_popper; Gtk::Button _close_button; Gtk::Menu *_menu; -- cgit v1.2.3