diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-07-14 08:27:22 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-07-14 08:27:22 -0400 |
commit | 0aac62e013e15e380001dafae39d554f8765a4a1 (patch) | |
tree | 1d205e81e4f00f25e8f4ddc522642ded3478706a /libs | |
parent | 394f2b3ca71ca324fe89fab7c1caae1bd55a9143 (diff) | |
parent | 2106a12edd6dcdf1189b7cfd68b07a0761d77c46 (diff) |
Merge branch 'master' into windows
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gtkmm2ext/barcontroller.cc | 6 | ||||
-rw-r--r-- | libs/gtkmm2ext/fastmeter.cc | 17 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/dndvbox.h | 2 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/fastmeter.h | 1 | ||||
-rw-r--r-- | libs/gtkmm2ext/pixfader.cc | 16 |
5 files changed, 21 insertions, 21 deletions
diff --git a/libs/gtkmm2ext/barcontroller.cc b/libs/gtkmm2ext/barcontroller.cc index 50c21e57e7..693151aaed 100644 --- a/libs/gtkmm2ext/barcontroller.cc +++ b/libs/gtkmm2ext/barcontroller.cc @@ -468,6 +468,12 @@ BarController::expose (GdkEventExpose* /*event*/) break; } + if (!darea.get_sensitive()) { + rounded_rectangle (context, 0, 0, darea.get_width(), darea.get_height(), 3); + context->set_source_rgba (0.505, 0.517, 0.525, 0.6); + context->fill (); + } + /* draw label */ double xpos = -1; diff --git a/libs/gtkmm2ext/fastmeter.cc b/libs/gtkmm2ext/fastmeter.cc index 4819609878..c0bcb05af5 100644 --- a/libs/gtkmm2ext/fastmeter.cc +++ b/libs/gtkmm2ext/fastmeter.cc @@ -53,7 +53,6 @@ FastMeter::FastMeter (long hold, unsigned long dimen, Orientation o, int len, { orientation = o; hold_cnt = hold; - resized = true; hold_state = 0; bright_hold = false; current_peak = 0; @@ -353,7 +352,6 @@ FastMeter::on_size_allocate (Gtk::Allocation &alloc) } DrawingArea::on_size_allocate (alloc); - resized = true; } bool @@ -372,16 +370,13 @@ FastMeter::vertical_expose (GdkEventExpose* ev) cairo_t* cr = gdk_cairo_create (get_window ()->gobj()); - if (resized) { - cairo_set_source_rgb (cr, 0, 0, 0); // black - rounded_rectangle (cr, 0, 0, pixrect.width + 2, pixheight + 2, 2); - cairo_stroke (cr); - //cairo_fill (cr); - //resized = false; - } cairo_rectangle (cr, ev->area.x, ev->area.y, ev->area.width, ev->area.height); cairo_clip (cr); + cairo_set_source_rgb (cr, 0, 0, 0); // black + rounded_rectangle (cr, 0, 0, pixrect.width + 2, pixheight + 2, 2); + cairo_stroke (cr); + top_of_meter = (gint) floor (pixheight * current_level); /* reset the height & origin of the rect that needs to show the pixbuf @@ -464,11 +459,10 @@ FastMeter::set (float lvl, float peak) current_level = lvl; - if (current_level == old_level && current_peak == old_peak && hold_state == 0) { + if (current_level == old_level && current_peak == old_peak && (hold_state == 0 || peak != -1)) { return; } - Glib::RefPtr<Gdk::Window> win; if ((win = get_window()) == 0) { @@ -565,7 +559,6 @@ FastMeter::set_highlight (bool onoff) } highlight = onoff; bgpattern = request_vertical_background (request_width, pixheight, highlight ? _bgh : _bgc, highlight); - resized = true; queue_draw (); } diff --git a/libs/gtkmm2ext/gtkmm2ext/dndvbox.h b/libs/gtkmm2ext/gtkmm2ext/dndvbox.h index bc5ca6c725..bbfd183c7b 100644 --- a/libs/gtkmm2ext/gtkmm2ext/dndvbox.h +++ b/libs/gtkmm2ext/gtkmm2ext/dndvbox.h @@ -351,7 +351,7 @@ private: /* dropped from ourselves onto ourselves */ - T* child = *((T **) selection_data.get_data()); + T* child = *((T * const *) selection_data.get_data()); if (drop.first == 0) { _internal_vbox.reorder_child (child->widget(), -1); diff --git a/libs/gtkmm2ext/gtkmm2ext/fastmeter.h b/libs/gtkmm2ext/gtkmm2ext/fastmeter.h index debe6c1cc7..f065020a57 100644 --- a/libs/gtkmm2ext/gtkmm2ext/fastmeter.h +++ b/libs/gtkmm2ext/gtkmm2ext/fastmeter.h @@ -91,7 +91,6 @@ private: float current_level; float current_peak; float current_user_level; - bool resized; bool highlight; bool vertical_expose (GdkEventExpose*); diff --git a/libs/gtkmm2ext/pixfader.cc b/libs/gtkmm2ext/pixfader.cc index 6e0c642917..0185550259 100644 --- a/libs/gtkmm2ext/pixfader.cc +++ b/libs/gtkmm2ext/pixfader.cc @@ -292,13 +292,15 @@ PixFader::on_expose_event (GdkEventExpose* ev) pango_cairo_show_layout (cr, _layout->gobj()); } -// 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.1); - cairo_fill (cr); - } -// } + if (!get_sensitive()) { + Gtkmm2ext::rounded_rectangle (cr, 0, 0, get_width(), get_height(), 3); + cairo_set_source_rgba (cr, 0.505, 0.517, 0.525, 0.4); + cairo_fill (cr); + } else 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.1); + cairo_fill (cr); + } last_drawn = ds; |