[ItemList] Fix item text positions in RTL mode.
This commit is contained in:
parent
809a982162
commit
343c35e7b0
@ -1260,11 +1260,12 @@ void ItemList::_notification(int p_what) {
|
|||||||
text_ofs += base_ofs;
|
text_ofs += base_ofs;
|
||||||
text_ofs += items[i].rect_cache.position;
|
text_ofs += items[i].rect_cache.position;
|
||||||
|
|
||||||
if (rtl) {
|
float text_w = width - text_ofs.x;
|
||||||
text_ofs.x = size.width - text_ofs.x - max_len;
|
items.write[i].text_buf->set_width(text_w);
|
||||||
}
|
|
||||||
|
|
||||||
items.write[i].text_buf->set_width(width - text_ofs.x);
|
if (rtl) {
|
||||||
|
text_ofs.x = size.width - width;
|
||||||
|
}
|
||||||
|
|
||||||
if (rtl) {
|
if (rtl) {
|
||||||
items.write[i].text_buf->set_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
|
items.write[i].text_buf->set_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
|
||||||
|
Loading…
Reference in New Issue
Block a user