GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Enable HiDPI on Windows by sandman7920 · Pull Request #2469 · sqlitebrowser/sqlitebrowser Conversation
Contributor
Enable HiDPI on Windows by default #2468
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Excellent, thanks @chrisjlocke and @sandman7920! 😄 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ok, this is merged now. We still need to figure out updated icons for HiDPI users though. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I assume you'd need some 'resources' directory where DB4S pulls the resources as necessary. If it detects HiDPI (or command-switch?) it uses an alternative directory which contains SVGs or larger PNGs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@chrisjlocke one could add Edit <file alias="open_data_in_app">application_go.png</file> <file alias="open_data_in_app@2x">[email protected]</file> |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
For the avoidance of doubt (that and I'm a dummy) if the normal 16x16 icon is application_go.png, then [email protected] would be 32x32, @3x.png would be 48x48, etc. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think @3x.png will be enough. You can test for yourself (windows) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Excellent, thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I have made test with database_add.png (new database). Screenshots below are made with base 32 for database_add.png |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Arggh not all icons exists in the hi-res set |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Might be able to use variants and alternatives until they fill the gaps... there are also some ico to svg converters .... not perfect, but better than nothing.... maybe..... ;) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I don't think project is still alive. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Digging into Qt documentation iconSize-prop This means iconSize it's a platform dependant, or the iconSize for all toolbars must be set manually. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I have made build with SVG resources and everything looks great on my side (4K display). @chrisjlocke may you test this build sqlitebrowser.zip @justinclift maybe it's better HiDPI to be enabled on all platforms? Some of UI files had to be changed, hard link to PNG files (not aliasing) Replacements TODO |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This looks like it's going down a pretty awesome path. 😄
No objection here. Seems like we could drop the That would at least let people on other platforms try it out, report problems, etc. 😄 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@justinclift could you try to build https://github.com/sandman7920/sqlitebrowser/tree/SVG on Mac OS Replacement I couldn't find replacement for Someone else should try to find replacement, I am pretty bad with those kind of things. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@sandman7920 In theory, these should be it: 😄 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@justinclift someone should test this, I don't have Mac at home and won't be going to the office for two weeks. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@revolter Would you have time to test if the icons in either of those two builds looks better on Retina / HiDPI screens than the standard (eg 3.12.1) build? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, they're sharp now, but too big: In this case, the icons except the first one are still blurry: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Toolbar icons are platform dependent. Which means iconSize it's tuned to the platform Guidelines, from the screenshots above one could see that height of the Toolbar is the same as before (only icons are scaled up), Icons of smaller size will not be scaled up (before was 16px). We could use something like this: class DB4SProxyStyle : public QProxyStyle { public: int pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override { if (metric == QStyle::PM_ToolBarIconSize) { return 16; // or maybe 22 } return QProxyStyle::pixelMetric(metric, option, widget); } }; ... int main( int argc, char ** argv ) { // Create application object. All the initialisation stuff happens in there Application a(argc, argv); a.setStyle(new DB4SProxyStyle); This will override default style with custom value. @justinclift , @revolter what do you think |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
So we're not specifying their size at all, not directly nor indirectly? I suppose we're using the icons in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, default size is set by platform style. On Windows is 30 on Linux 22, but if supplied resource is less than theme (platform default style) value Qt doesn't perform upscaling. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think that 16 would be perfect on macOS. For example, Safari uses 16pt icons too. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Screenshots with 16px on Windows, everything looks OK. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@sandman7920 Yep, can do. Are Windows or macOS or both needed? 😄 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
On Windows everything looks OK. @justinclift what is the next step, make new pull request? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Meh, I'll do both. macOS ones are building atm. They should be online in about 45 mins or so... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ahhh. Yeah, I'd say make a new PR. Since the new macOS build is already running though, we might as well check that just to make sure too. 😄 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
In master branch? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yep. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@revolter New macOS build to try, if you have the time. 😄 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The buttons are also smaller now, but I personally actually like it more than before: I don't know if it's related to this, but the text on these buttons gets truncated on hover: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@revolter before on Mac OS iconSize was set 22 (i think), which means height of the ToolBar was 22 and icons were drawn in the middle. Now height is 16, I also think it's looks better now.
I don't think so, but you can try to start application with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Awesome. Seems like an all-around win then. 😄 Thanks heaps for checking those builds @revolter. 😄 @sandman7920 You up for creating an appropriate PR (against |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Meaning QT_AUTO_SCREEN_SCALE_FACTOR=0 open "~/Downloads/DB Browser for SQLite.app"? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@revolter yes |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Then it doesn't fix that issue. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
I don't think 'open' will set the environment variable when it runs the .app. Instead, run the executable in the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oh, true. But it still doesn't fix the issue. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@justinclift is this a Qt 5.15.x build |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@sandman7920 Yep. Qt 5.15.1. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
As a data point, the test build has also been confirmed as working by someone on Twitter a few weeks ago: https://twitter.com/hakanu_/status/1341405851677057025 (Just noticed now, as I haven't been keeping an eye on Twitter) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.