fix #6117 - fader prelight
This commit is contained in:
parent
36bbd14113
commit
de85bfd857
|
@ -416,6 +416,8 @@ ARDOUR_UI::parameter_changed (std::string p)
|
|||
}
|
||||
} else if (p == "waveform-scale") {
|
||||
ArdourCanvas::WaveView::set_global_logscaled (ARDOUR_UI::config()->get_waveform_scale() == Logarithmic);
|
||||
} else if (p == "widget-prelight") {
|
||||
CairoWidget::set_widget_prelight( config()->get_widget_prelight() );
|
||||
} else if (p == "waveform-shape") {
|
||||
ArdourCanvas::WaveView::set_global_shape (ARDOUR_UI::config()->get_waveform_shape() == Rectified
|
||||
? ArdourCanvas::WaveView::Rectified : ArdourCanvas::WaveView::Normal);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
static const char* has_cairo_widget_background_info = "has_cairo_widget_background_info";
|
||||
|
||||
bool CairoWidget::_flat_buttons = false;
|
||||
bool CairoWidget::_widget_prelight = true;
|
||||
|
||||
static void noop() { }
|
||||
sigc::slot<void> CairoWidget::focus_handler (sigc::ptr_fun (noop));
|
||||
|
@ -256,6 +257,12 @@ CairoWidget::set_flat_buttons (bool yn)
|
|||
_flat_buttons = yn;
|
||||
}
|
||||
|
||||
void
|
||||
CairoWidget::set_widget_prelight (bool yn)
|
||||
{
|
||||
_widget_prelight = yn;
|
||||
}
|
||||
|
||||
void
|
||||
CairoWidget::set_focus_handler (sigc::slot<void> s)
|
||||
{
|
||||
|
|
|
@ -73,6 +73,9 @@ public:
|
|||
static void set_flat_buttons (bool yn);
|
||||
static bool flat_buttons() { return _flat_buttons; }
|
||||
|
||||
static void set_widget_prelight (bool yn);
|
||||
static bool widget_prelight() { return _widget_prelight; }
|
||||
|
||||
static void set_source_rgb_a( cairo_t* cr, Gdk::Color, float a=1.0 );
|
||||
|
||||
/* set_focus_handler() will cause all button-press events on any
|
||||
|
@ -112,6 +115,7 @@ protected:
|
|||
bool _need_bg;
|
||||
|
||||
static bool _flat_buttons;
|
||||
static bool _widget_prelight;
|
||||
bool _grabbed;
|
||||
|
||||
static sigc::slot<void> focus_handler;
|
||||
|
|
|
@ -325,7 +325,7 @@ PixFader::render (cairo_t *cr, cairo_rectangle_t* area)
|
|||
Gtkmm2ext::rounded_rectangle (cr, CORNER_OFFSET, CORNER_OFFSET, w-CORNER_SIZE, h-CORNER_SIZE, CORNER_RADIUS);
|
||||
cairo_set_source_rgba (cr, 0.505, 0.517, 0.525, 0.4);
|
||||
cairo_fill (cr);
|
||||
} else if (_hovering) {
|
||||
} else if (_hovering && CairoWidget::widget_prelight()) {
|
||||
Gtkmm2ext::rounded_rectangle (cr, CORNER_OFFSET, CORNER_OFFSET, w-CORNER_SIZE, h-CORNER_SIZE, CORNER_RADIUS);
|
||||
cairo_set_source_rgba (cr, 0.905, 0.917, 0.925, 0.1);
|
||||
cairo_fill (cr);
|
||||
|
|
Loading…
Reference in New Issue