From 58111034d09da960cf9982b703c6ab2647422e0b Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Thu, 28 Jul 2016 13:19:42 +0100 Subject: ui/widgets: Drop GTK2 fallbacks (bzr r15023.2.6) --- src/ui/widget/highlight-picker.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'src/ui/widget/highlight-picker.cpp') diff --git a/src/ui/widget/highlight-picker.cpp b/src/ui/widget/highlight-picker.cpp index 09999b52d..e4447cb9e 100644 --- a/src/ui/widget/highlight-picker.cpp +++ b/src/ui/widget/highlight-picker.cpp @@ -35,8 +35,6 @@ HighlightPicker::~HighlightPicker() { } - -#if WITH_GTKMM_3_0 void HighlightPicker::get_preferred_height_vfunc(Gtk::Widget& widget, int& min_h, int& nat_h) const @@ -66,39 +64,12 @@ void HighlightPicker::get_preferred_width_vfunc(Gtk::Widget& widget, nat_w += (nat_w) >> 1; } } -#else -void HighlightPicker::get_size_vfunc(Gtk::Widget& widget, - const Gdk::Rectangle* cell_area, - int* x_offset, - int* y_offset, - int* width, - int* height ) const -{ - Gtk::CellRendererPixbuf::get_size_vfunc( widget, cell_area, x_offset, y_offset, width, height ); - - if ( width ) { - *width = 10;//+= (*width) >> 1; - } - if ( height ) { - *height = 20; //cell_area ? cell_area->get_height() / 2 : 50; //+= (*height) >> 1; - } -} -#endif -#if WITH_GTKMM_3_0 void HighlightPicker::render_vfunc( const Cairo::RefPtr& cr, Gtk::Widget& widget, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, Gtk::CellRendererState flags ) -#else -void HighlightPicker::render_vfunc( const Glib::RefPtr& window, - Gtk::Widget& widget, - const Gdk::Rectangle& background_area, - const Gdk::Rectangle& cell_area, - const Gdk::Rectangle& expose_area, - Gtk::CellRendererState flags ) -#endif { GdkRectangle carea; @@ -140,11 +111,7 @@ void HighlightPicker::render_vfunc( const Glib::RefPtr& window, convert_pixbuf_argb32_to_normal(pixbuf); property_pixbuf() = Glib::wrap(pixbuf); -#if WITH_GTKMM_3_0 Gtk::CellRendererPixbuf::render_vfunc( cr, widget, background_area, cell_area, flags ); -#else - Gtk::CellRendererPixbuf::render_vfunc( window, widget, background_area, cell_area, expose_area, flags ); -#endif } bool HighlightPicker::activate_vfunc(GdkEvent* /*event*/, -- cgit v1.2.3