Bug 129879 - Qt UI swapped button order in save dialog
Summary: Qt UI swapped button order in save dialog
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.4.0.1 rc
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.5.0 target:6.4.0.2
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-08 09:20 UTC by Tomáš Chvátal
Modified: 2020-01-08 14:42 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
old save dialog (90.45 KB, image/png)
2020-01-08 09:20 UTC, Tomáš Chvátal
Details
new save dialog (113.36 KB, image/png)
2020-01-08 09:21 UTC, Tomáš Chvátal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomáš Chvátal 2020-01-08 09:20:30 UTC
Description:
https://openqa.opensuse.org/tests/1135498#step/ooffice/8

The Qt UI swapped the button order in the save dialog, which is counter the UI guidelines in Qt.

Steps to Reproduce:
Install the KDE interface for libreoffice and try to save the dialog.

Actual Results:
The dialog buttons compared to 6.3 are swapped.

Expected Results:
No buttons movement should happen.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Tomáš Chvátal 2020-01-08 09:20:48 UTC
Created attachment 156998 [details]
old save dialog
Comment 2 Tomáš Chvátal 2020-01-08 09:21:08 UTC
Created attachment 156999 [details]
new save dialog
Comment 3 Fabian Vogt 2020-01-08 10:42:44 UTC
There seems to be a mismatch between what Application::GetDesktopEnvironment() returns and what getButtonPriority() in layout.cxx expects. This should fix it:

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 981ac62..9c5a363 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -718,8 +718,8 @@ static int getButtonPriority(const OString &rType)
     const OUString &rEnv = Application::GetDesktopEnvironment();
 
     if (rEnv.equalsIgnoreAsciiCase("windows") ||
-        rEnv.equalsIgnoreAsciiCase("tde") ||
-        rEnv.startsWithIgnoreAsciiCase("kde"))
+        rEnv.equalsIgnoreAsciiCase("lxqt") ||
+        rEnv.startsWithIgnoreAsciiCase("plasma"))
     {
         pOrder = &aSaveDiscardCancel[0];
     }

LXQt uses Save/Discard/Cancel as well, so I added that and removed tde, which is not returned anymore.
Comment 4 Tomáš Chvátal 2020-01-08 12:28:08 UTC
Submitted to 6.4 branch and master.
Comment 5 Commit Notification 2020-01-08 14:35:56 UTC
Tomáš Chvátal committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4f0d4c9387eb1d73f96b9072128cff2038f6c61a

tdf#129879 Fix wrong order of buttons

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2020-01-08 14:42:26 UTC
Tomáš Chvátal committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/95d7d13205c05c2114a6d3bc2c4538246b22f3e0

tdf#129879 Fix wrong order of buttons

It will be available in 6.4.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.