Bug 439781 - About dialog of Elisa does not locate in the center of the parent window
Summary: About dialog of Elisa does not locate in the center of the parent window
Status: RESOLVED FIXED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR minor
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords: junior-jobs
: 441250 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-07-12 11:08 UTC by Fushan Wen
Modified: 2024-02-04 13:20 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fushan Wen 2021-07-12 11:08:43 UTC
SUMMARY
About dialog of Elisa does not locate in the center of the parent window, because Elisa does not set its parent window.

STEPS TO REPRODUCE
1. Open "About Elisa"

OBSERVED RESULT
About dialog does not locate in the center of the parent window.

EXPECTED RESULT
About dialog locates in the center of the parent window.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20210709
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.13.0-1-default (64-bit)
Graphics Platform: X11
Processors: 8 × AMD Ryzen 7 4700U with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD RENOIR

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2021-08-03 02:53:54 UTC
Problem is at https://invent.kde.org/multimedia/elisa/-/blob/master/src/elisaapplication.cpp#L284, if you want to submit a merge request to fix it. :)
Comment 2 Fushan Wen 2021-08-03 02:56:42 UTC
(In reply to Nate Graham from comment #1)
> Problem is at
> https://invent.kde.org/multimedia/elisa/-/blob/master/src/elisaapplication.
> cpp#L284, if you want to submit a merge request to fix it. :)

It seems it's impossible to set a QtQuick window as the parent of a QtWidget window. So Kirigami style about page should be used.
Comment 3 Nate Graham 2021-08-03 03:08:04 UTC
Yes, that would be a good option.
Comment 4 Nate Graham 2021-08-20 19:46:58 UTC
*** Bug 441250 has been marked as a duplicate of this bug. ***
Comment 5 Jack Hill 2021-09-03 23:40:12 UTC
The same issue occurs for "Configure Elisa...", "Configure Keyboard Shortcuts...", and "Report Bug..." all in the hamburger menu.

"Configure Elisa..." opens a window in the corners of the screen as if it were a separate app being launched, while the others open in the centre of the screen.
Comment 6 ilutov 2021-11-16 23:12:51 UTC
Is `QApplication::activeWindow()` an option for the "About Elisa" and "Report Bug..."? That seems to work fine.

"Configure Elisa..." uses a `QQmlComponent`, I couldn't find an option to set the parent window here. Similarly, "Elisa Handbook" calls `QDesktopServices::openUrl()` where setting a parent window doesn't seem possible.
Comment 7 Bug Janitor Service 2024-01-03 08:34:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/536
Comment 8 Bug Janitor Service 2024-01-29 19:29:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/547
Comment 9 Jack Hill 2024-02-04 13:20:18 UTC
Git commit f75207a949a7fd8346d40bd1dc132e1a14910591 by Jack Hill, on behalf of Benedikt Thiemer.
Committed on 04/02/2024 at 12:35.
Pushed by jackh into branch 'master'.

Refactor "About Elisa" dialog to use Kirigami Addons

M  +1    -14   src/elisaapplication.cpp
M  +2    -2    src/elisaapplication.h
M  +4    -0    src/main.cpp
M  +25   -6    src/qml/ElisaMainWindow.qml

https://invent.kde.org/multimedia/elisa/-/commit/f75207a949a7fd8346d40bd1dc132e1a14910591