mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
fix issue with color and position of mixer strip plugin control sliders (#5275)
git-svn-id: svn://localhost/ardour2/branches/3.0@13876 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d0272c4558
commit
b4abc10f71
1 changed files with 14 additions and 14 deletions
|
|
@ -88,6 +88,19 @@ PixFader::create_patterns ()
|
||||||
bg = c.get_green_p ();
|
bg = c.get_green_p ();
|
||||||
bb = c.get_blue_p ();
|
bb = c.get_blue_p ();
|
||||||
|
|
||||||
|
if ( !_text.empty()) {
|
||||||
|
_layout->get_pixel_size (_text_width, _text_height);
|
||||||
|
} else {
|
||||||
|
_text_width = 0;
|
||||||
|
_text_height = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
c = get_style()->get_text (get_state());
|
||||||
|
|
||||||
|
text_r = c.get_red_p ();
|
||||||
|
text_g = c.get_green_p ();
|
||||||
|
text_b = c.get_blue_p ();
|
||||||
|
|
||||||
cairo_surface_t* surface;
|
cairo_surface_t* surface;
|
||||||
cairo_t* tc = 0;
|
cairo_t* tc = 0;
|
||||||
float radius = CORNER_RADIUS;
|
float radius = CORNER_RADIUS;
|
||||||
|
|
@ -163,19 +176,6 @@ PixFader::create_patterns ()
|
||||||
|
|
||||||
cairo_destroy (tc);
|
cairo_destroy (tc);
|
||||||
cairo_surface_destroy (surface);
|
cairo_surface_destroy (surface);
|
||||||
|
|
||||||
if ( !_text.empty()) {
|
|
||||||
_layout->get_pixel_size (_text_width, _text_height);
|
|
||||||
} else {
|
|
||||||
_text_width = 0;
|
|
||||||
_text_height = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
c = get_style()->get_text (get_state());
|
|
||||||
|
|
||||||
text_r = c.get_red_p ();
|
|
||||||
text_g = c.get_green_p ();
|
|
||||||
text_b = c.get_blue_p ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
@ -261,7 +261,6 @@ PixFader::on_expose_event (GdkEventExpose* ev)
|
||||||
|
|
||||||
/* center text */
|
/* center text */
|
||||||
cairo_move_to (cr, (get_width() - _text_width)/2.0, get_height()/2.0 - _text_height/2.0);
|
cairo_move_to (cr, (get_width() - _text_width)/2.0, get_height()/2.0 - _text_height/2.0);
|
||||||
|
|
||||||
cairo_set_source_rgba (cr, text_r, text_g, text_b, 0.9);
|
cairo_set_source_rgba (cr, text_r, text_g, text_b, 0.9);
|
||||||
pango_cairo_show_layout (cr, _layout->gobj());
|
pango_cairo_show_layout (cr, _layout->gobj());
|
||||||
}
|
}
|
||||||
|
|
@ -583,6 +582,7 @@ PixFader::set_text (const std::string& str)
|
||||||
|
|
||||||
if (_layout) {
|
if (_layout) {
|
||||||
_layout->set_text (str);
|
_layout->set_text (str);
|
||||||
|
_layout->get_pixel_size (_text_width, _text_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
queue_resize ();
|
queue_resize ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue