qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

Strange behavior when hovering over checkboxes in the settings (workaround: move main application over to fusion style)

Open 54m4d opened this issue 5 years ago • 57 comments
trafficstars

Please provide the following information

qBittorrent version and Operating System

v4.3.0 (64-bit) Windows 10 Pro 2004 (Build 19041.264)

10.0.19041

If on linux, libtorrent-rasterbar and Qt version

Not on linux.

What is the problem

Strange animation and kind of blurry and bold checkboxes when hovering over them. (see attachments below)

Strange behavior

As it can be seen on the screenshot below, blurry and bold checkboxes when hovering over them with the mouse pointer.

Blurry and bold checkboxes

What is the expected behavior

The expected behavior is to not see that kind of strange animation around the checkboxes.

Steps to reproduce

Not sure if i'm the only one?

Extra info(if any)

My display is 2560x1440p and the scaling is at 125% When switching to 100% the issue does not occur. Did the high DPI scaling override and it did not help. No issues at all on qBittorrent v4.2.5

══════════════════════════════════════════════════════════════════════════════════

EDIT: 03.05.2021

The scaling issue has improved a lot since last time although i haven't done anything, as you can see in the demo below, the visual artifact in the checkboxes has improved significantly even though there are 1-2 checkboxes that still artifact (mostly when scrolling up and down)

Capture 03_05_2021_06_47_06

I have also zoomed in on the checkboxes to give you an idea on how the artifacted ones look like:

Capture 03_05_2021_07_27_20

54m4d avatar Oct 22 '20 03:10 54m4d

I have this issue as well. Anything that has a hover or focus state displays distorted behavior. I'm suspecting the cause to be the Qt upgrade.

jaywyeee avatar Oct 22 '20 10:10 jaywyeee

@fosam @jaywyeee Can you edit your qt.conf file with this:

[Platforms] WindowsArguments = fontengine=freetype

EDIT: I believe this to be Qt fractional scale problem.

xavier2k6 avatar Oct 22 '20 10:10 xavier2k6

@fosam @jaywyeee Can you edit your qt.conf file with this:

[Platforms] WindowsArguments = fontengine=freetype

EDIT: I believe this to be Qt fractional scale problem.

@xavier2k6 Thanks for the effort

But sorry to say that it made the font a bit worse than before while the above issue still persists.

With fontengine=freetype

fontengine=freetype

Without fontengine=freetype the text/font is sharper and therefore more clear as you can see below:

normal

54m4d avatar Oct 22 '20 16:10 54m4d

No fix in v4.3.0.1

54m4d avatar Oct 23 '20 03:10 54m4d

@fosam @jaywyeee Can you edit your qt.conf file with this:

[Platforms] WindowsArguments = fontengine=freetype

EDIT: I believe this to be Qt fractional scale problem.

Same result as @fosam.

jaywyeee avatar Oct 23 '20 09:10 jaywyeee

Can you guys try the below test build, it is 4.3.0 with a "crash fix" (This essentially became the official 4.3.0.1)

(Trying to see if compilation with MSVC 2017 Vs MSVC 2019 plays any role here with regards to HiDpi/scaling)

Windows test build of 4.3.0(Release) with https://github.com/arvidn/libtorrent/pull/5228 & listed libraries:

qBittorrent Release | 4.3.0 commit: b925cff (Oct 18, 2020)
libtorrent-rasterbar | 1.2.10.0 commit: c2f001a (Oct 19, 2020)
Qt                   | 5.15.1
OpenSSL              | 1.1.1h
zlib                 | 1.2.11
Boost                | 1.74

Download Link

xavier2k6 avatar Oct 28 '20 15:10 xavier2k6

@xavier2k6 Thanks for the effort but unfortunately...👇😭

Screenshot 2020-10-28 203023

54m4d avatar Oct 28 '20 19:10 54m4d

thanks @fosam for the feedback, did you experience this with 4.2,5? - that used Qt 5.13.2

We won't know for sure if Qt5.15.2 will fix this, if it is a Qt issue until around the 3rd+ of November when it is scheduled to be released & a test build can be created.

xavier2k6 avatar Oct 28 '20 20:10 xavier2k6

@xavier2k6 No issues at all on qBittorrent v4.2.5 Would be great if somebody could test Qt 5.15.2 it is only a few days away

54m4d avatar Oct 30 '20 06:10 54m4d

@xavier2k6 No issues at all on qBittorrent v4.2.5 Would be great if somebody could test Qt 5.15.2 it is only a few days away

I will provide a test build as soon as I have access to the released Qt5.15.2 source.

xavier2k6 avatar Oct 30 '20 11:10 xavier2k6

@xavier2k6 Thanks!

54m4d avatar Oct 30 '20 11:10 54m4d

Still the same issue with v4.3.1

54m4d avatar Nov 25 '20 20:11 54m4d

I can reproduce this with 4.3.1 + Windows 10 20H2, 1080p screen, no DPI-related environment variable overrides, with 150% scaling or higher.

Doesn't matter if DPI setting is changed before qBittorrent is started or while it is running.

Workarounds mentioned in https://github.com/qbittorrent/qBittorrent/issues/13749#issuecomment-742873508 have no effect on this one.

FranciscoPombal avatar Dec 10 '20 23:12 FranciscoPombal

I can reproduce this with 4.3.1 + Windows 10 20H2, 1080p screen, no DPI-related environment variable overrides, changing with 150% scaling or higher.

Doesn't matter if DPI setting is changed before qBittorrent is started or while it is running.

Workarounds mentioned in #13749 (comment) have no effect on this one.

@FranciscoPombal

I've tried all the workarounds, non-work, but note that i have no issues @100% scaling as i mentioned above. 1440p screen. Were you able to reproduce the issue @100% scaling too?

54m4d avatar Dec 11 '20 09:12 54m4d

@fosam

@FranciscoPombal

I've tried all the workarounds, non-work, but note that i have no issues @100% scaling as i mentioned above. 1440p screen. Were you able to reproduce the issue @100% scaling too?

As my comment says:

  • the linked workarounds don't solve this problem
  • In my case (1080p monitor) I can only reproduce on 150% scaling or higher (though it is possible that the problem also exists at 125% but the artifacting is too small to notice). No issues at 100%.

FranciscoPombal avatar Dec 11 '20 12:12 FranciscoPombal

As my comment says:

  • the linked workarounds don't solve this problem
  • In my case (1080p monitor) I can only reproduce on 150% scaling or higher (though it is possible that the problem also exists at 125% but the artifacting is too small to notice). No issues at 100%.

@FranciscoPombal

Yes. for me the issue starts @125% and the more you go up, the worse it gets, keep also in mind that the settings menu i'm showing above in the issue is not the only affected item, the pop-up windows for example also don't look natural, like the pop-up window when you check for updates. it looks distorted.

My question though is why qBittorrent v4.2.5 does not have this issue at all, what's the difference?

Let's hope it gets fixed in future developments :)

54m4d avatar Dec 11 '20 17:12 54m4d

@fosam

Yes. for me the issue starts @125% and the more you go up, the worse it gets, keep also in mind that the settings menu i'm showing above in the issue is not the only affected item, the pop-up windows for example also don't look natural, like the pop-up window when you check for updates. it looks distorted.

:+1:

My question though is why qBittorrent v4.2.5 does not have this issue at all, what's the difference?

Newer Qt version. Qt support for high DPI scaling has always been a mess. It is now better than ever, but little quirks like this remain. While this a straight regression in your use case, for other users, there were even worse issues that got fixed. It's sort of a case of "whack a bug here, another one (smaller, at least) appears somewhere else".

Let's hope it will be better in future development :)

These kinds of issues should all go away once Qt supports the Per Monitor V2 mechanism/protocol/whatever in Windows. This is expected for Qt6, but there is a chance that it might be backported to one of the remaining Qt5.x releases. Not much we can do until then. Just enjoy the other features. Recent versions, >= 4.3.0 offer massive improvements in performance and connectivity over 4.2.x versions.

FranciscoPombal avatar Dec 11 '20 18:12 FranciscoPombal

Thanks!

54m4d avatar Dec 11 '20 18:12 54m4d

@FranciscoPombal @fosam I've been able to reproduce this issue on 150% scaling/1080p monitor too & I believe below is a fix/workaround Can you try? (tested with 4.3.1 portable profile/defaults....so no qt.conf manipulation)

Select qBittorrent.exe->right click->Properties->Compatibility->Change high DPI settings

High DPI scaling override Override high DPI scaling behaviour->Enable Scaling performed by:->System

xavier2k6 avatar Dec 11 '20 19:12 xavier2k6

@FranciscoPombal @fosam I've been able to reproduce this issue on 150% scaling/1080p monitor too & I believe below is a fix/workaround Can you try? (tested with 4.3.1 portable profile/defaults....so no qt.conf manipulation)

Select qBittorrent.exe->right click->Properties->Compatibility->Change high DPI settings

High DPI scaling override Override high DPI scaling behaviour->Enable Scaling performed by:->System

@xavier2k6

That is the first thing that comes to mind, and of course doesn't work, it makes the font look the worst, same as when we tried the free font workaround, check the comparison above..

Sorry to disappoint :(

54m4d avatar Dec 11 '20 19:12 54m4d

@fosam Have you Let Windows try to fix apps so they're not blurry enabled as well under Advanced scaling settings?

xavier2k6 avatar Dec 11 '20 20:12 xavier2k6

@fosam Have you Let Windows try to fix apps so they're not blurry enabled as well under Advanced scaling settings?

Yes of course, i tried all those workarounds before opening this issue here, and unfortunately non of them worked.

I think i need better eyes to be able to use 100% scaling 😁

54m4d avatar Dec 11 '20 20:12 54m4d

@fosam are you running in portable mode by any chance?

Can you post a screenshot of qBittorrent.exe via Task Manager->Details with column DPI Awareness active for each Windows argument 0,1,2

xavier2k6 avatar Dec 12 '20 20:12 xavier2k6

@fosam are you running in portable mode by any chance?

Can you post a screenshot of qBittorrent.exe via Task Manager->Details with column DPI Awareness active for each Windows argument 0,1,2

@xavier2k6 I'm running in regular mode.

Screenshot of qBittorrent.exe in task manager or what? there's too little details in there..

dpiawareness=1 dpiawareness=1

54m4d avatar Dec 13 '20 14:12 54m4d

Can you run qbittorrent -style fusion from a command prompt/where you have qbittorrent installed.

xavier2k6 avatar Jan 26 '21 23:01 xavier2k6

@xavier2k6 I did, and the issue did not appear there, however, the style/theme of qbittorrent changed, now it looks more like a Mac/Linux theme and it didn't look as sharp as the standard one, but ok this workaround fixed the issue kind of, Thanks!

In my next reply i will include a screenshot showing a small demo.

54m4d avatar Jan 27 '21 12:01 54m4d

qbittorrent -style fusion

Capture 27_01_2021_13_35_52

54m4d avatar Jan 27 '21 12:01 54m4d

If we are to fully support HiDPI screens etc we will have to probably make qBittorrent on windows use the fusion style as default.

High DPI Support in Qt

While the macOS style fully supports high-DPI, the Windows desktop style currently has some limitations with certain scale factors. In these cases, consider using the Fusion style instead, which supports high-DPI in all cases.

ref: https://doc.qt.io/qt-5/highdpi.html#:~:text=Windows%20desktop%20style%20currently%20has%20some%20limitations%20with%20certain%20scale%20factors.%20In%20these%20cases,%20consider%20using%20the%20Fusion%20style%20instead

xavier2k6 avatar Jan 27 '21 14:01 xavier2k6

@xavier2k6

Are there any other ways to apply fusion style other than running qBittorrent from a command prompt?

54m4d avatar Jan 27 '21 14:01 54m4d

@xavier2k6

Why don't i have issues with this one? running on the exact same system.

Capture 05_02_2021_18_16_34

54m4d avatar Feb 05 '21 17:02 54m4d