fix position of left edge of a marker rectangle when the label is on the left, and slightly pad the rectangle when the label is on the right
This commit is contained in:
parent
2e2390d053
commit
94fd0b39e0
@ -408,11 +408,14 @@ Marker::setup_name_display ()
|
|||||||
_name_item->set (_name);
|
_name_item->set (_name);
|
||||||
|
|
||||||
if (label_on_left ()) {
|
if (label_on_left ()) {
|
||||||
|
/* adjust right edge of background to fit text */
|
||||||
_name_background->set_x0 (_name_item->position().x - 2);
|
_name_background->set_x0 (_name_item->position().x - 2);
|
||||||
_name_background->set_x1 (_name_item->position().x + name_width + _shift);
|
_name_background->set_x1 (_name_item->position().x + name_width + _shift);
|
||||||
} else {
|
} else {
|
||||||
_name_background->set_x0 (_name_item->position().x - _label_offset + 2);
|
/* right edge remains at zero (group-relative). Add
|
||||||
_name_background->set_x1 (_name_item->position().x + name_width);
|
* arbitrary 4 pixels of extra padding at the end
|
||||||
|
*/
|
||||||
|
_name_background->set_x1 (_name_item->position().x + name_width + 4.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user