mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 12:19:33 +01:00
[Summary] Removed unnecessary region file label indentation on MAC, caused by Pango bug. Corrected label and its highlight processing order.
This commit is contained in:
parent
ad84d76d4e
commit
29fb3816d6
1 changed files with 17 additions and 12 deletions
|
|
@ -738,9 +738,6 @@ TimeAxisViewItem::set_height (double height)
|
|||
void
|
||||
TimeAxisViewItem::manage_name_highlight ()
|
||||
{
|
||||
manage_sr_highlight ();
|
||||
manage_ioconfig_highlight ();
|
||||
|
||||
if (!name_highlight) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -774,13 +771,15 @@ TimeAxisViewItem::manage_name_highlight ()
|
|||
}
|
||||
|
||||
manage_name_text ();
|
||||
|
||||
manage_ioconfig_highlight ();
|
||||
manage_sr_highlight ();
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
TimeAxisViewItem::manage_ioconfig_highlight ()
|
||||
{
|
||||
manage_sr_highlight();
|
||||
|
||||
if (!ioconfig_highlight) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -802,10 +801,14 @@ TimeAxisViewItem::manage_ioconfig_highlight ()
|
|||
return;
|
||||
}
|
||||
|
||||
double ioconfig_x1 = ioconfig_label_width + 2*NAME_HIGHLIGHT_X_INDENT + name_highlight->x1 ();
|
||||
|
||||
#ifdef __APPLE__
|
||||
ioconfig_x1 = ioconfig_x1 - NAME_HIGHLIGHT_X_INDENT; // there is a bug in pango with text width definition on MAC
|
||||
#endif // __APPLE__
|
||||
// there is a bug in pango with text width definition on MAC
|
||||
// that's why ioconfig_label_width is bigger then is in fact
|
||||
double ioconfig_x1 = ioconfig_label_width + NAME_HIGHLIGHT_X_INDENT/2 + name_highlight->x1 ();
|
||||
#else
|
||||
double ioconfig_x1 = ioconfig_label_width + 2*NAME_HIGHLIGHT_X_INDENT + name_highlight->x1 ();
|
||||
#endif
|
||||
|
||||
if (_width < ioconfig_x1) {
|
||||
ioconfig_x1 = _width;
|
||||
|
|
@ -845,10 +848,13 @@ TimeAxisViewItem::manage_sr_highlight ()
|
|||
return;
|
||||
}
|
||||
|
||||
double sr_x1 = sr_label_width + 2*NAME_HIGHLIGHT_X_INDENT + ioconfig_highlight->x1 ();
|
||||
#ifdef __APPLE__
|
||||
sr_x1 = sr_x1 - NAME_HIGHLIGHT_X_INDENT; // there is a bug in pango with text width definition on MAC
|
||||
#endif // __APPLE__
|
||||
// there is a bug in pango with text width definition on MAC
|
||||
// that's why ioconfig_label_width is bigger then is in fact
|
||||
double sr_x1 = sr_label_width + NAME_HIGHLIGHT_X_INDENT/2 + ioconfig_highlight->x1 ();
|
||||
#else
|
||||
double sr_x1 = sr_label_width + 2*NAME_HIGHLIGHT_X_INDENT + ioconfig_highlight->x1 ();
|
||||
#endif
|
||||
|
||||
if (_width < sr_x1) {
|
||||
sr_x1 = _width;
|
||||
|
|
@ -1126,7 +1132,6 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
|
|||
_width = pixel_width;
|
||||
|
||||
manage_name_highlight ();
|
||||
manage_name_text ();
|
||||
|
||||
if (pixel_width < 2.0) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue