summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_button.h
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2014-08-22 11:45:34 -0500
committerBen Loftis <ben@harrisonconsoles.com>2014-08-22 11:51:20 -0500
commit74f313dd6b52c5bd36536d90e7b9e62b0679087b (patch)
treea25d093f1f85a3ab2850b9dc0a4a437d3736fef7 /gtk2_ardour/ardour_button.h
parenta7226133a990afa294339ffa735f9dee8eff97e4 (diff)
Rationalize ArdourButton and lots of associated theming issues.
ArdourButtons now have a "pushed" animation. The gradient is now implemented in the button, rather than providing 2 colors in the theme, which was burdensome. Lots of code cleanup in ArdourButton. Removed several unnecessary flags. Refactor more stuff into route_ui.
Diffstat (limited to 'gtk2_ardour/ardour_button.h')
-rw-r--r--gtk2_ardour/ardour_button.h51
1 files changed, 17 insertions, 34 deletions
diff --git a/gtk2_ardour/ardour_button.h b/gtk2_ardour/ardour_button.h
index 260e0b21ab..d36445d181 100644
--- a/gtk2_ardour/ardour_button.h
+++ b/gtk2_ardour/ardour_button.h
@@ -37,7 +37,7 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
Body = 0x2,
Text = 0x4,
Indicator = 0x8,
- Inset = 0x10,
+ unused = 0x10,
Menu = 0x20,
};
@@ -53,9 +53,9 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
virtual ~ArdourButton ();
enum Tweaks {
- ShowClick = 0x1,
- NoModel = 0x2,
- ImplicitUsesSolidColor = 0x4,
+ unused1 = 0x1,
+ unused2 = 0x2,
+ unused3 = 0x4,
};
Tweaks tweaks() const { return _tweaks; }
@@ -64,12 +64,13 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
void set_active_state (Gtkmm2ext::ActiveState);
void set_visual_state (Gtkmm2ext::VisualState);
+ void set_act_on_release (bool onRelease) { _act_on_release = onRelease; }
+
Element elements() const { return _elements; }
void set_elements (Element);
void add_elements (Element);
void set_corner_radius (float);
- void set_rounded_corner_mask (int);
void set_diameter (float);
void set_text (const std::string&);
@@ -132,40 +133,22 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
double _angle;
float _xalign, _yalign;
- uint32_t bg_color;
- uint32_t border_color;
- uint32_t fill_start_inactive_color;
- uint32_t fill_end_inactive_color;
- uint32_t fill_start_active_color;
- uint32_t fill_end_active_color;
- uint32_t text_active_color;
- uint32_t text_inactive_color;
- uint32_t led_active_color;
- uint32_t led_inactive_color;
+ uint32_t fill_inactive_color;
+ uint32_t fill_active_color;
+
+ uint32_t text_active_color;
+ uint32_t text_inactive_color;
+
+ uint32_t led_active_color;
+ uint32_t led_inactive_color;
- cairo_pattern_t* fill_pattern;
- cairo_pattern_t* fill_pattern_active;
- cairo_pattern_t* shine_pattern;
+ cairo_pattern_t* convex_pattern;
+ cairo_pattern_t* concave_pattern;
+
cairo_pattern_t* led_inset_pattern;
- cairo_pattern_t* reflection_pattern;
cairo_rectangle_t* _led_rect;
- double text_r;
- double text_g;
- double text_b;
- double text_a;
-
- double led_r;
- double led_g;
- double led_b;
- double led_a;
-
- double active_r;
- double active_g;
- double active_b;
- double active_a;
-
bool _act_on_release;
bool _led_left;
bool _fixed_diameter;