mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
cue markers: pixel pushing
This commit is contained in:
parent
292faff26e
commit
6c6e7ba2ee
1 changed files with 8 additions and 2 deletions
|
|
@ -507,8 +507,10 @@ ArdourMarker::setup_name_display ()
|
||||||
limit = _right_label_limit;
|
limit = _right_label_limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
const float padding = std::max(2.f, rintf(2.f * UIConfiguration::instance().get_ui_scale()));
|
float scale = UIConfiguration::instance().get_ui_scale();
|
||||||
const double M3 = std::max(1.f, rintf(3.f * UIConfiguration::instance().get_ui_scale()));
|
|
||||||
|
const float padding = std::max(2.f, rintf(2.f * scale));
|
||||||
|
const double M3 = std::max(1.f, rintf(3.f * scale));
|
||||||
|
|
||||||
/* Work out how wide the name can be */
|
/* Work out how wide the name can be */
|
||||||
int name_width = min ((double) pixel_width (_name, name_font) + padding, limit);
|
int name_width = min ((double) pixel_width (_name, name_font) + padding, limit);
|
||||||
|
|
@ -551,6 +553,10 @@ ArdourMarker::setup_name_display ()
|
||||||
_name_flag->set_x0 (M3);
|
_name_flag->set_x0 (M3);
|
||||||
_name_flag->set_x1 (_name_item->position().x + name_width + padding);
|
_name_flag->set_x1 (_name_item->position().x + name_width + padding);
|
||||||
break;
|
break;
|
||||||
|
case Cue:
|
||||||
|
_name_flag->set_x0 (M3);
|
||||||
|
_name_flag->set_x1 (_name_item->position().x + name_width + padding + 1*scale);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
_name_flag->set_x0 (0);
|
_name_flag->set_x0 (0);
|
||||||
_name_flag->set_x1 (_name_item->position().x + name_width + padding);
|
_name_flag->set_x1 (_name_item->position().x + name_width + padding);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue