void set_text (const std::string&);
void set_markup (const std::string&);
void set_angle (const double);
+ void set_alignment (const float, const float);
+ void get_alignment (float& xa, float& ya) {xa = _xalign; ya = _yalign;};
void set_led_left (bool yn);
void set_distinct_led_click (bool yn);
bool on_button_release_event (GdkEventButton*);
void set_image (const Glib::RefPtr<Gdk::Pixbuf>&);
+ void set_bg_colors (uint32_t color_active, uint32_t color_inactive);
protected:
void render (cairo_t *);
int _corner_mask;
double _angle;
+ float _xalign, _yalign;
uint32_t bg_color;
uint32_t border_color;
- uint32_t fill_color_active;
- uint32_t fill_color_inactive;
+
+ uint32_t fill_color_active;
+ uint32_t fill_color_active_start;
+ uint32_t fill_color_active_end;
+ uint32_t fill_color_inactive_start;
+ uint32_t fill_color_inactive_end;
+ uint32_t text_color_inactive;
+ uint32_t text_color_active;
+ uint32_t led_color_inactive;
+ uint32_t led_color_active;
+
cairo_pattern_t* fill_pattern;
cairo_pattern_t* fill_pattern_active;
cairo_pattern_t* shine_pattern;
bool _fixed_diameter;
bool _distinct_led_click;
bool _hovering;
-
+
static bool _flat_buttons;
void setup_led_rect ();
void set_colors ();
+ void build_patterns ();
void color_handler ();
void action_toggled ();