3.0-SG catchup merge after git changeover and merge with master (more to do)

This commit is contained in:
Paul Davis 2013-04-01 14:59:17 -04:00
parent 712750112d
commit 55c59504ca
36 changed files with 59 additions and 1789 deletions

View file

@ -119,12 +119,6 @@ class PixFader : public Gtk::DrawingArea
bool _hovering;
void create_patterns();
cairo_pattern_t* pattern;
cairo_pattern_t* shine_pattern;
bool _hovering;
GdkWindow* grab_window;
double grab_loc;
double grab_start;

View file

@ -39,7 +39,7 @@ namespace Gtkmm2ext {
class SliderController : public Gtkmm2ext::PixFader
{
public:
SliderController (Glib::RefPtr<Gdk::Pixbuf>, Glib::RefPtr<Gdk::Pixbuf>, Gtk::Adjustment* adj, int orientation, int);
SliderController (Gtk::Adjustment* adj, int orientation, int, int);
virtual ~SliderController () {}

View file

@ -184,41 +184,6 @@ PixFader::create_patterns ()
cairo_surface_destroy (surface);
}
void
PixFader::create_patterns ()
{
Gdk::Color c = get_style()->get_fg (get_state());
float r, g, b;
r = c.get_red_p ();
g = c.get_green_p ();
b = c.get_blue_p ();
if (_orien == VERT) {
pattern = cairo_pattern_create_linear (0.0, 0.0, get_width(), 0);
cairo_pattern_add_color_stop_rgba (pattern, 0, r*0.8,g*0.8,b*0.8, 1.0);
cairo_pattern_add_color_stop_rgba (pattern, 1, r*0.6,g*0.6,b*0.6, 1.0);
shine_pattern = cairo_pattern_create_linear (0.0, 0.0, 15, 0);
cairo_pattern_add_color_stop_rgba (shine_pattern, 0, 1,1,1,0.0);
cairo_pattern_add_color_stop_rgba (shine_pattern, 0.2, 1,1,1,0.3);
cairo_pattern_add_color_stop_rgba (shine_pattern, 0.5, 1,1,1,0.0);
cairo_pattern_add_color_stop_rgba (shine_pattern, 1, 1,1,1,0.0);
} else {
float rheight = get_height();
pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, rheight);
cairo_pattern_add_color_stop_rgba (pattern, 0, r*0.8,g*0.8,b*0.8, 1.0);
cairo_pattern_add_color_stop_rgba (pattern, 1, r*0.6,g*0.6,b*0.6, 1.0);
shine_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, rheight);
cairo_pattern_add_color_stop_rgba (shine_pattern, 0, 1,1,1,0.0);
cairo_pattern_add_color_stop_rgba (shine_pattern, 0.2, 1,1,1,0.3);
cairo_pattern_add_color_stop_rgba (shine_pattern, 0.5, 1,1,1,0.0);
cairo_pattern_add_color_stop_rgba (shine_pattern, 1, 1,1,1,0.0);
}
}
bool
PixFader::on_expose_event (GdkEventExpose* ev)
{
@ -335,14 +300,6 @@ PixFader::on_expose_event (GdkEventExpose* ev)
}
// }
// if (Config->get_widget_prelight()) { //pixfader does not have access to config
if (_hovering) {
Gtkmm2ext::rounded_rectangle (cr, 0, 0, get_width(), get_height(), 3);
cairo_set_source_rgba (cr, 0.905, 0.917, 0.925, 0.2);
cairo_fill (cr);
}
// }
last_drawn = ds;
return true;
@ -381,21 +338,6 @@ PixFader::on_size_allocate (Gtk::Allocation& alloc)
update_unity_position ();
}
void
PixFader::on_size_allocate (Gtk::Allocation& alloc)
{
DrawingArea::on_size_allocate(alloc);
if (_orien == VERT) {
view.height = span = alloc.get_height();
} else {
view.width = span = alloc.get_width();
}
update_unity_position ();
queue_draw ();
}
bool
PixFader::on_button_press_event (GdkEventButton* ev)
{