summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_button.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-10-27 20:10:49 +0000
committerDavid Robillard <d@drobilla.net>2011-10-27 20:10:49 +0000
commit743f0ea0ecaa44204abed163187f3335894dcda1 (patch)
tree63fa0982b04bae65ff2ec07e2075cff4d7a237d3 /gtk2_ardour/ardour_button.h
parent5005ba060ec93b08cb9cc4beabcfc7a5f7ef2f84 (diff)
Ever so slightly less memory and better field alignment per CairoWidget.
Fix indentation. git-svn-id: svn://localhost/ardour2/branches/3.0@10316 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_button.h')
-rw-r--r--gtk2_ardour/ardour_button.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/gtk2_ardour/ardour_button.h b/gtk2_ardour/ardour_button.h
index b7e073af05..1bf5aaac19 100644
--- a/gtk2_ardour/ardour_button.h
+++ b/gtk2_ardour/ardour_button.h
@@ -47,7 +47,7 @@ class ArdourButton : public CairoWidget, Gtk::Activatable
Element elements() const { return _elements; }
void set_corner_radius (float);
- void set_diameter (float);
+ void set_diameter (float);
void set_text (const std::string&);
void set_markup (const std::string&);
@@ -59,22 +59,20 @@ class ArdourButton : public CairoWidget, Gtk::Activatable
protected:
void render (cairo_t *);
- void on_size_request (Gtk::Requisition* req);
+ void on_size_request (Gtk::Requisition* req);
void on_size_allocate (Gtk::Allocation&);
bool on_button_press_event (GdkEventButton*);
bool on_button_release_event (GdkEventButton*);
private:
- Element _elements;
Glib::RefPtr<Pango::Layout> _layout;
- std::string _text;
- int _text_width;
- int _text_height;
- bool _led_left;
- float _diameter;
- bool _fixed_diameter;
- bool _distinct_led_click;
- float _corner_radius;
+ std::string _text;
+ Element _elements;
+
+ int _text_width;
+ int _text_height;
+ float _diameter;
+ float _corner_radius;
cairo_pattern_t* edge_pattern;
cairo_pattern_t* fill_pattern;
@@ -91,7 +89,11 @@ class ArdourButton : public CairoWidget, Gtk::Activatable
double led_b;
double led_a;
- void set_colors ();
+ bool _led_left;
+ bool _fixed_diameter;
+ bool _distinct_led_click;
+
+ void set_colors ();
void color_handler ();
void state_handler ();
};