mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
boxpointer: Swap arrow alignment on RTL
The current code uses the arrow alignment to align the menu between
the top/left (0) and bottom/right(1), regardless of the text direction.
Instead of adjusting code everywhere, reinterpret the parameter
to refer to start/end instead, and swap the alignment with an
RTL text direction.
Credit to Sebastian Keller for spotting the cause of the issue.
Close https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5261
Close https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7356
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3150>
(cherry picked from commit 4e70315fbb)
This commit is contained in:
parent
d21e3485c9
commit
05df19b048
1 changed files with 3 additions and 0 deletions
|
|
@ -533,6 +533,9 @@ export const BoxPointer = GObject.registerClass({
|
|||
switch (this._arrowSide) {
|
||||
case St.Side.TOP:
|
||||
case St.Side.BOTTOM:
|
||||
if (this.text_direction === Clutter.TextDirection.RTL)
|
||||
alignment = 1.0 - alignment;
|
||||
|
||||
resX = sourceCenterX - (halfMargin + (natWidth - margin) * alignment);
|
||||
|
||||
resX = Math.max(resX, workarea.x + padding);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue