Skip to content
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

Pixelated icons on high DPI displays (macOS) #549

Closed
Wandmalfarbe opened this issue Sep 15, 2020 · 24 comments
Closed

Pixelated icons on high DPI displays (macOS) #549

Wandmalfarbe opened this issue Sep 15, 2020 · 24 comments

Comments

@Wandmalfarbe
Copy link

All icons are pixelated on high DPI displays:

Screenshot 2020-09-15 at 14 47 04


OS: macOS Catalina
OS Version: 10.15.6
iMac (Retina 5K, 27-inch, 2017)
Graphics: Radeon Pro 575 4 GB

@kevinhendricks
Copy link
Contributor

This is pretty much expected behaviour as our icons are not svg and are largest icon versions are only 48px x 48px. That said, I do not notice it on my iMac with retina display under macOS 10.14.5 nor on my MacBook Pro 16 under macOS 10.15.6.

What Sigil setting to zoom icons are you using? Are you using macOS system Accessibility features to further zoom icons?

@kevinhendricks
Copy link
Contributor

Closing this as not a bug since expected behaviour until we move to either svg icons or supply still larger plugins.

Feel free to still add your comments even though closed as we will still see them.

@Wandmalfarbe
Copy link
Author

What Sigil setting to zoom icons are you using?

The standard ones. I resetted them before opening the bug report.

Screenshot 2020-09-15 at 15 46 16

Are you using macOS system Accessibility features to further zoom icons?

I'm not using any Accessibility features.

@kevinhendricks
Copy link
Contributor

Try playing with Sigil's icon zoom setting to make sure that the 48 x 48 pixel versions are being used and not just scaling of the 22 0px ones.

If that does not change anything, then the only way to improve anything would be for Sigil to supply even larger png icon sets for all icons or move to SVG based icons and then ship the QtSVG module as well.

After our next release, I will look into seeing if larger 96px x 96px can even be generated from what we have. Recreating all of them as svg files would be a big task.

@dougmassay
Copy link
Contributor

I was thinking @BeckyDTP had the bulk of the new icons in svg already, but I could be wrong.

@kevinhendricks
Copy link
Contributor

I can not recreate this issue on any macOS machine I own or have access to. What macOS Display Setting are you using (default or scaled)? If scaled, is it set of Larger Text or Larger Area?

@Wandmalfarbe
Copy link
Author

I can not recreate this issue on any macOS machine I own or have access to. What macOS Display Setting are you using (default or scaled)? If scaled, is it set of Larger Text or Larger Area?

Screen Shot 2020-09-20 at 15 53 10

I use Default for display. If I use Scaled the icons are still pixellated even when I choose all options (Large Text or More Space).

@kevinhendricks
Copy link
Contributor

Wow! I really can not see any pixelation on any of my retina displays. Very strange. What happens if you try growing the icons using Sigil preferences to be a bigger? Or smaller? At some setting, Qt should jump to using the actual 48x48 pixel version of the icons to the 22x22 pixel version (and visa-versa) and the change in pixelation should become apparent.

@kevinhendricks
Copy link
Contributor

This is a one screen set-up right? Not two or more.

I will try building a full svg icon version of Sigil later this week for you to test with, just to see if something other than icon size is at work here. Perhaps something video driver related? Would you be willing to test it and report back?

@Wandmalfarbe
Copy link
Author

I updated Sigil from a previous installation and will test if it makes a difference when starting from a fresh install.

This is a one screen set-up right? Not two or more.

Yes, I only use the builtin iMac screen.

I will try building a full svg icon version of Sigil later this week for you to test with, just to see if something other than icon size is at work here. Perhaps something video driver related? Would you be willing to test it and report back?

Of course. Im glad to help!

@eli-schwartz
Copy link
Contributor

eli-schwartz commented Sep 22, 2020

Isn't the imageformats plugin for svg already distributed by windeployqt/macdeployqt if it is there to begin with? So sigil should be getting deployed with svg image support already... It is probably needed to display icons in the book.

(The svg image plugin automatically pulls in the QtSvg shared library.)

@kevinhendricks
Copy link
Contributor

The iconengine svg plugin is included and svg icons do workout of the box and we are planning a full svg only icon set. QtSVg is also included, butI am not sure about the imageformat svg plugin as only QtWebEngine uses non-icon svgs and it uses its own chrome/3rdparty svg code.

@kevinhendricks
Copy link
Contributor

@Wandmalfarbe,
Please try with this macOS interim CI build from Travis.

Download ./bin/Sigil-master-75eaf74-build_num-658.tar.xz from https://drive.google.com/uc?id=1bnanMnv5etYhHT6biqojYIYN09FS3r96&export=download

It uses full svg widgets. It may require you to use the View->Toolbars menu to make all of the icons visible you want, and may require some drag and dropping of toolbar icons to get the order you want.

Please examine it for pixelated icons as these should no longer exist unless there is some issue with your graphics driver since they are all scalable svg images. You may want to play with icon scaling as well to see what impact it has.

Hope this does the trick and we can then close this.

@kevinhendricks
Copy link
Contributor

Would you please try the build posted in the preceding link and report back so we can get this fixed if still needed.

@Wandmalfarbe
Copy link
Author

Would you please try the build posted in the preceding link and report back so we can get this fixed if still needed.

Sorry I'm a bit busy at the moment. Will try this evening.

@Wandmalfarbe
Copy link
Author

I removed the old Sigil completely and took a screenshot of the provided app right after startup.

Screen Shot 2020-10-01 at 22 57 06

As you can see the icons are still pixelated. Maybe this can help? IJHack/QtPass#526

@dougmassay
Copy link
Contributor

I think the suggestion is worth a shot, Kevin. We're using Qt::AA_UseHighDpiPixmaps on Windows and Linux already, and I've seen references to needing to enable it on Mac as well. I know MacOs should natively handle highDPI stuff, but Qt can screw up a soup sandwich if you let it. ;)

@dougmassay
Copy link
Contributor

dougmassay commented Oct 1, 2020

My interpretation of Qt::AA_UseHighDpiPixmaps is that it has nothing to do with the OS level DPI scaling. It's purely a Qt construct to affect the behavior of QIcon::pixmap. From the documentation:

Setting the Qt::AA_UseHighDpiPixmaps application attribute enables this function to return pixmaps that are larger than the requested size. Such images will have a devicePixelRatio larger than 1.

Otherwise, pixmaps (which I'm convinced our new svg icons are being dynamically converted to at times) will always be smaller--never larger-- than their requested size.

For the record: Kovid excludes Macs when setting Qt.AA_EnableHighDpiScaling for calibre, but he doesn't exclude macs when setting Qt::AA_UseHighDpiPixmaps.

@kevinhendricks
Copy link
Contributor

Sounds like something worth trying. I will make that change and push to master to produce another test build.

That said, I do know that Apple is still having issues with Retina 5K drivers for some iMacs. The latest 10.15.7 OS updates included a number of fixes specifically for 2020 iMacs and some earlier versions.

So this might just turn out to be something broken in Qt, or something broken in the Apple driver.

@kevinhendricks
Copy link
Contributor

Sorry hit close by mistake.

@kevinhendricks
Copy link
Contributor

Okay, I just pushed that change to master. Once the travis ci build completes in a few minutes I will post a new download link for you to test and report back on. Hopefully this will do the trick. If not, I am a bit stumped as I can not recreate this on any of my machines, and we have moved to all svg icons to eliminate any normal icon scaling limitations.

@kevinhendricks
Copy link
Contributor

Here is the new test build with that change enabled:

Download ./bin/Sigil-master-858ef01-build_num-683.tar.xz from https://drive.google.com/uc?id=1XxcLOkE51-LAr5T1A00TGGmMuqkHD2AI&export=download

Please let us know if this fixes the issue.

@Wandmalfarbe
Copy link
Author

Screen Shot 2020-10-02 at 08 47 13

Your latest test build did fix the issue. As you can see the menu bar icons are nice and crisp. Some icons still appear pixelated (like the panel close icon) but I suspect that is because they are not available in higher resolution. Thank you for this fix and your hard work on Sigil!

@kevinhendricks
Copy link
Contributor

Glad to hear it.
Thank you for your bug report! The fix will appear in the next official release of Sigil.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants