Project

General

Profile

Actions

Bug #14761

open
RM

Fix RTL x coordinate inversion.

Bug #14761: Fix RTL x coordinate inversion.

Added by Romain Mardulyn 21 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
Start date:
08/19/2026
Due date:
% Done:

0%

Estimated time:

Description

Due to left and right being reversed in RTL, WDialog::positionAt(WMouseEvent) does not move the WDialog to the mouse coordinate, but on the opposite side of the screen.

Since cases like this would make it harder to have the same code be used for both RTL and LTR, it would be great to fix this bug by adding a way for the Coordinates to be translated to some sort of RTL equivalent when in RTL mode. For instance, we could add a Coordinates::layoutDirectionEquivalent() that would return the actual coordinate when in LTR, but also return equivalent coordinates when in RTL, so that WWebWidget::setOffsets(mouseEvent.window().layoutDirectionEquivalent().x, Side::Left) sets the inset-inline-start so that the widget is correctly positioned at the mouse (for fixed positioned widgets).

No data to display

Actions

Also available in: PDF Atom