- if (_elements & Edge) {
- Gtkmm2ext::rounded_rectangle (cr, 0, 0, _width, _height, _corner_radius);
- cairo_set_source (cr, edge_pattern);
- cairo_fill (cr);
+ cairo_set_source_rgba (cr, 0, 0, 0, 1);
+ rounded_function(cr, 0, 0, get_width(), get_height(), _corner_radius);
+ cairo_fill (cr);
+
+ rounded_function (cr, 1, 1, get_width()-2, get_height()-2, _corner_radius - 1.5);
+ } else {
+ rounded_function (cr, 0, 0, get_width(), get_height(), _corner_radius);
+ }
+
+ if (active_state() == Gtkmm2ext::ImplicitActive) {
+
+ if (!(_tweaks & ImplicitUsesSolidColor)) {
+ cairo_set_source (cr, fill_pattern);
+ } else {
+ cairo_set_source (cr, fill_pattern_active);
+ }
+ cairo_fill (cr);
+
+ if (!(_tweaks & ImplicitUsesSolidColor)) {
+ //border
+ UINT_TO_RGBA (fill_color_active, &r, &g, &b, &a);
+ cairo_set_line_width (cr, 1.0);
+ rounded_function (cr, 2, 2, get_width()-4, get_height()-4, _corner_radius - 1.5);
+ cairo_set_source_rgba (cr, r/255.0, g/255.0, b/255.0, a/255.0);
+ cairo_stroke (cr);
+ }
+
+ } else if (active_state() == Gtkmm2ext::ExplicitActive || ((_elements & Indicator)==Indicator) ) {
+
+ //background color
+ cairo_set_source (cr, fill_pattern_active);
+ cairo_fill (cr);
+
+ } else {
+
+ //background color
+ cairo_set_source (cr, fill_pattern);
+ cairo_fill (cr);
+
+ }