From a89dd0f5f45c3df19c3d6756fef83ab06f3d5356 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Mon, 21 May 2012 11:01:41 +0100 Subject: More size-request GTK+ 3 fixes (bzr r11391) --- src/ui/widget/dock-item.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/ui/widget/dock-item.cpp') diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp index 238e93b0b..0f93968e5 100644 --- a/src/ui/widget/dock-item.cpp +++ b/src/ui/widget/dock-item.cpp @@ -168,10 +168,14 @@ DockItem::set_size_request(int width, int height) getWidget().set_size_request(width, height); } -void -DockItem::size_request(Gtk::Requisition& requisition) +void DockItem::size_request(Gtk::Requisition& requisition) { +#if WITH_GTKMM_3_0 + Gtk::Requisition req_natural; + getWidget().get_preferred_size(req_natural, requisition); +#else requisition = getWidget().size_request(); +#endif } void -- cgit v1.2.3 From a8a5397db22a0cbeecb46eee097adece5dedf14e Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Mon, 21 May 2012 12:25:30 +0100 Subject: GTK+ 3 changes for cell-renderers (bzr r11392) --- src/ui/widget/dock-item.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ui/widget/dock-item.cpp') diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp index 0f93968e5..b9cc50845 100644 --- a/src/ui/widget/dock-item.cpp +++ b/src/ui/widget/dock-item.cpp @@ -58,7 +58,11 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l Gtk::StockItem item; Gtk::StockID stockId(icon_name); if ( Gtk::StockItem::lookup(stockId, item) ) { +#if WITH_GTKMM_3_0 + _icon_pixbuf = _dock.getWidget().render_icon_pixbuf( stockId, Gtk::ICON_SIZE_MENU ); +#else _icon_pixbuf = _dock.getWidget().render_icon( stockId, Gtk::ICON_SIZE_MENU ); +#endif } } } -- cgit v1.2.3 From ea952687e7b1ae64c4c30c8eb66bd875d75fec2d Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sat, 23 Feb 2013 13:57:26 +0000 Subject: Fix missing headers for Gtk+ 3 build Fixed bugs: - https://launchpad.net/bugs/1122816 (bzr r12145) --- src/ui/widget/dock-item.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ui/widget/dock-item.cpp') diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp index b9cc50845..8d960ddc3 100644 --- a/src/ui/widget/dock-item.cpp +++ b/src/ui/widget/dock-item.cpp @@ -18,6 +18,7 @@ #include #include +#include namespace Inkscape { namespace UI { -- cgit v1.2.3