diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-11-02 18:47:14 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-11-02 18:47:14 +0000 |
commit | 0cc9daed289a96a82171335660304a3cdc6f42c6 (patch) | |
tree | 184402f16c2267bb096b60f2c06b33949f14be79 /gtk2_ardour/ardour_button.h | |
parent | 592bfa3616678838bb80b925d66fbadae2d20d7e (diff) |
allow addition of images to ArdourButtons (always centered)
git-svn-id: svn://localhost/ardour2/branches/3.0@10399 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_button.h')
-rw-r--r-- | gtk2_ardour/ardour_button.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk2_ardour/ardour_button.h b/gtk2_ardour/ardour_button.h index 4732eec509..72614b2b8e 100644 --- a/gtk2_ardour/ardour_button.h +++ b/gtk2_ardour/ardour_button.h @@ -37,7 +37,6 @@ class ArdourButton : public CairoWidget Body = 0x2, Text = 0x4, Indicator = 0x8, - Image = 0x16 }; static Element default_elements; @@ -70,6 +69,8 @@ class ArdourButton : public CairoWidget bool on_button_press_event (GdkEventButton*); bool on_button_release_event (GdkEventButton*); + void set_image (const Glib::RefPtr<Gdk::Pixbuf>&); + protected: void render (cairo_t *); void on_size_request (Gtk::Requisition* req); @@ -81,6 +82,7 @@ class ArdourButton : public CairoWidget private: Glib::RefPtr<Pango::Layout> _layout; + Glib::RefPtr<Gdk::Pixbuf> _pixbuf; std::string _text; Element _elements; BindingProxy binding_proxy; |