mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
rounding off all clock corners
git-svn-id: svn://localhost/ardour2/branches/3.0@13436 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e1166e3266
commit
1f14987044
1 changed files with 14 additions and 6 deletions
|
|
@ -283,7 +283,7 @@ AudioClock::render (cairo_t* cr)
|
||||||
cairo_set_source_rgba (cr, bg_r, bg_g, bg_b, bg_a);
|
cairo_set_source_rgba (cr, bg_r, bg_g, bg_b, bg_a);
|
||||||
if (corner_radius) {
|
if (corner_radius) {
|
||||||
if (_left_layout) {
|
if (_left_layout) {
|
||||||
Gtkmm2ext::rounded_top_half_rectangle (cr, 0, 0, get_width(), upper_height, corner_radius);
|
Gtkmm2ext::rounded_top_half_rectangle (cr, 0, 0, get_width() - corner_radius/2.0, upper_height, corner_radius);
|
||||||
} else {
|
} else {
|
||||||
Gtkmm2ext::rounded_rectangle (cr, 0, 0, get_width(), upper_height, corner_radius);
|
Gtkmm2ext::rounded_rectangle (cr, 0, 0, get_width(), upper_height, corner_radius);
|
||||||
}
|
}
|
||||||
|
|
@ -316,7 +316,9 @@ 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, left_rect_width, h, corner_radius);
|
Gtkmm2ext::rounded_bottom_half_rectangle (cr, 0, upper_height + separator_height,
|
||||||
|
left_rect_width + (separator_height == 0 ? corner_radius : 0),
|
||||||
|
h - corner_radius/2.0, corner_radius);
|
||||||
} else {
|
} else {
|
||||||
cairo_rectangle (cr, 0, upper_height + separator_height, left_rect_width, h);
|
cairo_rectangle (cr, 0, upper_height + separator_height, left_rect_width, h);
|
||||||
}
|
}
|
||||||
|
|
@ -328,9 +330,10 @@ AudioClock::render (cairo_t* cr)
|
||||||
|
|
||||||
if (_need_bg) {
|
if (_need_bg) {
|
||||||
if (corner_radius) {
|
if (corner_radius) {
|
||||||
Gtkmm2ext::rounded_bottom_half_rectangle (cr, left_rect_width + separator_height, upper_height + separator_height,
|
Gtkmm2ext::rounded_bottom_half_rectangle (cr, left_rect_width + separator_height,
|
||||||
get_width() - separator_height - left_rect_width, h,
|
upper_height + separator_height,
|
||||||
corner_radius);
|
get_width() - separator_height - left_rect_width - corner_radius/2.0,
|
||||||
|
h - corner_radius/2.0, corner_radius);
|
||||||
} else {
|
} else {
|
||||||
cairo_rectangle (cr, left_rect_width + separator_height, upper_height + separator_height,
|
cairo_rectangle (cr, left_rect_width + separator_height, upper_height + separator_height,
|
||||||
get_width() - separator_height - left_rect_width, h);
|
get_width() - separator_height - left_rect_width, h);
|
||||||
|
|
@ -547,6 +550,9 @@ AudioClock::on_size_request (Gtk::Requisition* req)
|
||||||
req->height += separator_height;
|
req->height += separator_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
req->height += corner_radius/2.0;
|
||||||
|
req->width += corner_radius/2.0;
|
||||||
|
|
||||||
first_height = req->height;
|
first_height = req->height;
|
||||||
first_width = req->width;
|
first_width = req->width;
|
||||||
}
|
}
|
||||||
|
|
@ -2177,7 +2183,9 @@ void
|
||||||
AudioClock::set_corner_radius (double r)
|
AudioClock::set_corner_radius (double r)
|
||||||
{
|
{
|
||||||
corner_radius = r;
|
corner_radius = r;
|
||||||
queue_draw ();
|
first_width = 0;
|
||||||
|
first_height = 0;
|
||||||
|
queue_resize ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue