-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
FileDialog style and other efficiency fixes #634
Conversation
I see no visible change on Ubuntu, I guess this impacts only Windows users. |
Well, this does impact me who is on Arch/KDE. |
Is your filedialog like the second picture above? |
@HanYoung-uwu This is how it looks like for me |
So in your case, QFileDialog opens native filedialog using XDG, your native filedialog is gnome so Qt style doesn't affect you. But for system which native filedialog is written in Qt, ugly windows theme is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small changes on the git commits.
Noting to say on the code itself.
Remove close() on QFile because it close file in destructor, call it here you pay one more check on destructing (and extra line of code)
This comment could be put in the commit message itself
("Don't close the QFile explicitly as it will be close anyway in the destructor.")
src/kiwixapp.cpp
Outdated
getMainWindow(), | ||
gt("open-zim"), | ||
QString(), | ||
"ZimFile (*.zim*)"); | ||
|
||
if (_zimfile.isEmpty()) { | ||
return; | ||
} | ||
_zimfile = QDir::toNativeSeparators(_zimfile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change should be made in previous commit.
7fbfb9c
to
250bf5e
Compare
force pushed. Please re-review |
We are good. Thanks ! |
Setting windows style on non-windows platform makes FileDialog looks hideous.
![Default style](https://user-images.githubusercontent.com/76819220/116892791-c95cb280-ac62-11eb-86d1-ece16de1fd89.png)
![After set the Windows style](https://user-images.githubusercontent.com/76819220/116892795-ca8ddf80-ac62-11eb-8949-ca6b13e533bb.png)
Note that "Windows" style is not what you usually want even if you like windows style. "QWindowsVistaStyle" is what people usually choose.
Other changes include:
KiwixApp::openZimFile
close()
on QFile because it close file in destructor, call it here you pay one more check on destructing (and extra line of code)