mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 21:56:30 +01:00
[Summary] Pixel hunting.
This commit is contained in:
parent
89742f77a2
commit
cc56c0ff86
2 changed files with 56 additions and 23 deletions
|
|
@ -320,27 +320,41 @@ AudioClock::render (cairo_t* cr)
|
||||||
|
|
||||||
if (_need_bg) {
|
if (_need_bg) {
|
||||||
if (corner_radius) {
|
if (corner_radius) {
|
||||||
Gtkmm2ext::rounded_bottom_half_rectangle (cr, 0, upper_height + separator_height,
|
Gtkmm2ext::rounded_bottom_half_rectangle (cr,
|
||||||
|
_current_event_expose->area.x,
|
||||||
|
_current_event_expose->area.y + upper_height + separator_height,
|
||||||
left_rect_width + (separator_height == 0 ? corner_radius : 0),
|
left_rect_width + (separator_height == 0 ? corner_radius : 0),
|
||||||
h, corner_radius);
|
h,
|
||||||
|
corner_radius);
|
||||||
} else {
|
} else {
|
||||||
cairo_rectangle (cr, 0, upper_height + separator_height, left_rect_width, h);
|
cairo_rectangle (cr,
|
||||||
|
_current_event_expose->area.x,
|
||||||
|
_current_event_expose->area.y + upper_height + separator_height,
|
||||||
|
left_rect_width,
|
||||||
|
h);
|
||||||
}
|
}
|
||||||
cairo_fill (cr);
|
cairo_fill (cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
cairo_move_to (cr, x_leading_padding, upper_height + separator_height + ((h - info_height)/2.0));
|
cairo_move_to (cr,
|
||||||
|
_current_event_expose->area.x + x_leading_padding,
|
||||||
|
_current_event_expose->area.y + upper_height + separator_height + ((h - info_height)/2.0));
|
||||||
pango_cairo_show_layout (cr, _left_layout->gobj());
|
pango_cairo_show_layout (cr, _left_layout->gobj());
|
||||||
|
|
||||||
if (_need_bg) {
|
if (_need_bg) {
|
||||||
if (corner_radius) {
|
if (corner_radius) {
|
||||||
Gtkmm2ext::rounded_bottom_half_rectangle (cr, left_rect_width + separator_height,
|
Gtkmm2ext::rounded_bottom_half_rectangle (cr,
|
||||||
upper_height + separator_height,
|
_current_event_expose->area.x + left_rect_width + separator_height,
|
||||||
|
_current_event_expose->area.y + upper_height + separator_height,
|
||||||
get_width() - separator_height - left_rect_width,
|
get_width() - separator_height - left_rect_width,
|
||||||
h, corner_radius);
|
h,
|
||||||
|
corner_radius);
|
||||||
} else {
|
} else {
|
||||||
cairo_rectangle (cr, left_rect_width + separator_height, upper_height + separator_height,
|
cairo_rectangle (cr,
|
||||||
get_width() - separator_height - left_rect_width, h);
|
_current_event_expose->area.x + left_rect_width + separator_height,
|
||||||
|
_current_event_expose->area.y + upper_height + separator_height,
|
||||||
|
get_width() - separator_height - left_rect_width,
|
||||||
|
h);
|
||||||
}
|
}
|
||||||
cairo_fill (cr);
|
cairo_fill (cr);
|
||||||
}
|
}
|
||||||
|
|
@ -361,9 +375,13 @@ AudioClock::render (cairo_t* cr)
|
||||||
/* rather cut off the right end than overlap with the text on the left */
|
/* rather cut off the right end than overlap with the text on the left */
|
||||||
x = x_leading_padding + left_rect_width + separator_height;
|
x = x_leading_padding + left_rect_width + separator_height;
|
||||||
}
|
}
|
||||||
cairo_move_to (cr, x, upper_height + separator_height + ((h - info_height)/2.0));
|
cairo_move_to (cr,
|
||||||
|
_current_event_expose->area.x + x,
|
||||||
|
_current_event_expose->area.y + upper_height + separator_height + ((h - info_height)/2.0));
|
||||||
} else {
|
} else {
|
||||||
cairo_move_to (cr, x_leading_padding + left_rect_width + separator_height, upper_height + separator_height + ((h - info_height)/2.0));
|
cairo_move_to (cr,
|
||||||
|
_current_event_expose->area.x + x_leading_padding + left_rect_width + separator_height,
|
||||||
|
_current_event_expose->area.y + upper_height + separator_height + ((h - info_height)/2.0));
|
||||||
}
|
}
|
||||||
pango_cairo_show_layout (cr, _right_layout->gobj());
|
pango_cairo_show_layout (cr, _right_layout->gobj());
|
||||||
|
|
||||||
|
|
@ -372,9 +390,18 @@ AudioClock::render (cairo_t* cr)
|
||||||
|
|
||||||
if (_need_bg) {
|
if (_need_bg) {
|
||||||
if (corner_radius) {
|
if (corner_radius) {
|
||||||
Gtkmm2ext::rounded_bottom_half_rectangle (cr, 0, upper_height + separator_height, get_width(), h, corner_radius);
|
Gtkmm2ext::rounded_bottom_half_rectangle (cr,
|
||||||
|
_current_event_expose->area.x,
|
||||||
|
_current_event_expose->area.y + upper_height + separator_height,
|
||||||
|
get_width(),
|
||||||
|
h,
|
||||||
|
corner_radius);
|
||||||
} else {
|
} else {
|
||||||
cairo_rectangle (cr, 0, upper_height + separator_height, get_width(), h);
|
cairo_rectangle (cr,
|
||||||
|
_current_event_expose->area.x,
|
||||||
|
_current_event_expose->area.y + upper_height + separator_height,
|
||||||
|
get_width(),
|
||||||
|
h);
|
||||||
}
|
}
|
||||||
cairo_fill (cr);
|
cairo_fill (cr);
|
||||||
}
|
}
|
||||||
|
|
@ -400,22 +427,22 @@ AudioClock::render (cairo_t* cr)
|
||||||
|
|
||||||
cairo_set_source_rgba (cr, cursor_r, cursor_g, cursor_b, cursor_a);
|
cairo_set_source_rgba (cr, cursor_r, cursor_g, cursor_b, cursor_a);
|
||||||
cairo_rectangle (cr,
|
cairo_rectangle (cr,
|
||||||
min (get_width() - 2.0,
|
_current_event_expose->area.x + min (get_width() - 2.0, (double) xcenter + cursor.get_x()/PANGO_SCALE + em_width),
|
||||||
(double) xcenter + cursor.get_x()/PANGO_SCALE + em_width),
|
_current_event_expose->area.y + (upper_height - layout_height)/2.0,
|
||||||
(upper_height - layout_height)/2.0,
|
2.0,
|
||||||
2.0, cursor.get_height()/PANGO_SCALE);
|
cursor.get_height()/PANGO_SCALE);
|
||||||
cairo_fill (cr);
|
cairo_fill (cr);
|
||||||
} else {
|
} else {
|
||||||
/* we've entered all possible digits, no cursor */
|
/* we've entered all possible digits, no cursor */
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (input_string.empty()) {
|
if (input_string.empty()) {
|
||||||
cairo_set_source_rgba (cr, cursor_r, cursor_g, cursor_b, cursor_a);
|
cairo_set_source_rgba (cr, cursor_r, cursor_g, cursor_b, cursor_a);
|
||||||
cairo_rectangle (cr,
|
cairo_rectangle (cr,
|
||||||
(get_width()/2.0),
|
_current_event_expose->area.x + (get_width()/2.0),
|
||||||
(upper_height - layout_height)/2.0,
|
_current_event_expose->area.y + (upper_height - layout_height)/2.0,
|
||||||
2.0, upper_height);
|
2.0,
|
||||||
|
upper_height);
|
||||||
cairo_fill (cr);
|
cairo_fill (cr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -991,6 +1018,9 @@ AudioClock::set (framepos_t when, bool force, framecnt_t offset)
|
||||||
void
|
void
|
||||||
AudioClock::set_slave_info ()
|
AudioClock::set_slave_info ()
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
|
/* TRACKS: Let's carefully define what we need here
|
||||||
|
*/
|
||||||
if (!_left_layout || !_right_layout) {
|
if (!_left_layout || !_right_layout) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,10 @@
|
||||||
box.expand="true"
|
box.expand="true"
|
||||||
box.fill="true">
|
box.fill="true">
|
||||||
<EventBox bgnormal="#383838">
|
<EventBox bgnormal="#383838">
|
||||||
|
<VBox>
|
||||||
|
<EventBox bgnormal="#000000" height="1"/>
|
||||||
<Hbox id="mixer_strips_home"/>
|
<Hbox id="mixer_strips_home"/>
|
||||||
|
</VBox>
|
||||||
</EventBox>
|
</EventBox>
|
||||||
</ScrolledWindow>
|
</ScrolledWindow>
|
||||||
</CompactMeterbridge>
|
</CompactMeterbridge>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue