-
-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use StelMainView as the parent for all message boxes and file dialogs #3448
Conversation
Only those used to tell about OpenGL errors are not parented since in this case this might be useless. This makes the styling of these dialogs match that of the main window.
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
Looks great! I hope to have a closer look on Saturday. |
I see native dialogs in Windows/macOS. As far as I remember, the non-native style of dialogs was caused problems in Linux Mint. |
What do you mean by native style? X11/Wayland-based desktops don't have any native style, each GUI toolkit uses its own. And what problems did you have? I'm using Ubuntu 20.04 and there are no problems here. Moreover, some dialogs are already parented to |
Native look for operating system UI. The issue (crash?) was happened around Qt 5.5-5.6 and it was caused from Qt/GTK+ bridge. Probably this is not actual anymore. |
Tried on Windows: No visual change. some observations (maybe unrelated): when first running, I had no wayland plugin installed and a warning. The fullscreen was black, only black. I could not F11 to window mode. Edited the config.ini, then it seemed to work. In exit, there was a Segfault. Then I installed qt6-wayland. It works windowed, but now the window is not resizable ( I have read about decoration issues with wayland a few days ago, so maybe that's expected now?) But no Segfault at exit. If those observations are unrelated, I think it's OK. I hope window resizing on wayland (if that is what's used on WSL now) will be re-established. Or some alternative Qt plugin recommended for WSL. |
Is Wayland the default window system in WSL? I thought it would be X11... I think Wayland support still has a long road towards stability even on "real" Unices.
This may be #3427.
Shouldn't be related. In any case, we've already had some dialogs with non-null parent, I've just made this set more complete in this PR. |
I did nothing to configure a particular GUI plugin, and never bothered about the syntax to try other plugins. Just running WSL/U22.04.3 LTS.
Maybe, but no other error message. |
In any case, you can just try this commit and the preceding one, and if no regression is noticed, this should be OK. |
Yes, unrelated, more observations of xcb: just works. Uhm, now I just had a Segfault on exit with xcb :-( :-(. During use, I did not call any system panels (color picking, file dialog, ...)
And now Segfault on exiting the wayland run. Going back one commit: No segfault. Going to this commit: the segfault seems no longer reproducible, and I also have one on exiting emacs when launched into background. Weird. So, I think this spurious segfault may also be unrelated. OK for me. |
Hello @10110111! Please check the fresh version (development snapshot) of Stellarium: |
Hello @10110111! Please check the latest stable version of Stellarium: |
Description
In many cases the separate-window dialogs like message boxes and file open/save/etc. dialogs are given no parent in Stellarium. This leads to them looking very different in style and color scheme from the rest of the Stellarium GUI. The most striking difference is the light color scheme of the dialogs contrasting with the dark colors of Stellarium. Example:
This patch changes almost all places that use
QMessageBox
andQFileDialog
to pass&StelMainView::getInstance()
as the parent, following the example of other places (and sometimes even the same files in other lines!). Only the message boxes used to tell about OpenGL errors are not parented since in this case this might be useless. The result looks like this: