hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.57k stars 439 forks source link

Systray icon dimension on 4k hidpi screens #1054

Open kimlop opened 5 years ago

kimlop commented 5 years ago

Hello, I'm using CopyQ on Ubuntu 18.04 on Gnome with a 4k screen, the icon is very small, it's possible to fix it? thank you

image

hluk commented 5 years ago

Resolution for the tray icon is 128x128.

This is most likely an issue in Qt or libraries that integrate the tray icon into notification area in Gnome.

You could try exiting CopyQ and launching it with QT_SCREEN_SCALE_FACTORS=2 copyq from terminal to see if there is any difference (alternatively setting GDK_SCALE=2 could help).

kimlop commented 5 years ago

the QT_SCREEN_SCALE_FACTORS=2 parameters help only with the UI, GDK_SCALE=2 doesn't change anything. When I was on Ubuntu 16.04 on the same screen I hadn't this issue.

scottkosty commented 5 years ago

I see the same issue now after installing Ubuntu 18.10 (the icon looks to be the same size and place as the screenshot by kimlop). Further, I do not have a HiDPI screen, so perhaps this issue affects all screen types.

I have access to two systems that have very similar hardware. One has Ubuntu 18.04, where I do not see the icon problem in this issue. The other has Ubuntu 18.10, where I do see the icon issue. I've compiled the current master branch on both systems.

This suggests that it was a change in Qt that triggered the change. For the 18.04 system, I get:

$ copyq --version
CopyQ Clipboard Manager v3.7.2-27-g0108ccf9
Qt: 5.9.5
Compiler: GCC
Arch: x86_64-little_endian-lp64
OS: Ubuntu 18.04.1
$ 

For the 18.10 system, I get:

$ copyq --version
CopyQ Clipboard Manager v3.7.2-27-g0108ccf9
Qt: 5.11.1
Compiler: GCC
Arch: x86_64-little_endian-lp64
OS: Ubuntu 18.10
$ 

This issue doesn't bother me much so I'm happy to wait until you move to Qt 5.12. However, I'm also happy to help if you prefer to resolve it sooner--let me know if there is any debug information that I can provide if it would help.

hluk commented 5 years ago

Can anyone test the fix in branch fix-icon-resolution? I could reproduce it (and fix it) in VM but only after setting some obscure scaling option (using gsettings set org.gnome.desktop.interface text-scaling-factor 2).

scottkosty commented 5 years ago

@hluk I tested but I don't see a difference. The icon still appears smaller.

hluk commented 5 years ago

@hluk I tested but I don't see a difference. The icon still appears smaller.

It's probably bug in the installed Qt version. I'm waiting also on Qt 5.12 to get some tray icon fixes (there another graphical glitch in Qt tray icons on i3 and xfce).

scottkosty commented 5 years ago

@hluk sounds good!

hluk commented 5 years ago

Oops, closed accidentally with the bug fix.

hluk commented 5 years ago

BTW, I'm now on Gnome 3.30 with TopIcons Plus extension to show the tray (using Qt 5.11.1 on Fedora 29). Icons looks fine with both Wayland and X11 session.

image

So perhaps it's rather issue of the tray extension or Gnome itself.

scottkosty commented 5 years ago

So perhaps it's rather issue of the tray extension or Gnome itself.

Ah that would make sense. That might explain why the OP sees the issue with Ubuntu 18.04 and I do not see it with Ubuntu 18.04.

memeplex commented 5 years ago

I'm in Ubuntu 19.04. This is still a bug.

image

I'm using the appindicator gnome extension.

ThinkDigitalSoftware commented 4 years ago

Resolution for the tray icon is 128x128.

This is most likely an issue in Qt or libraries that integrate the tray icon into notification area in Gnome.

You could try exiting CopyQ and launching it with QT_SCREEN_SCALE_FACTORS=2 copyq from terminal to see if there is any difference (alternatively setting GDK_SCALE=2 could help).

This fixed my issue with the icon being too large. Can this be a setting inside the preferences?

Before the fix Screenshot from 2020-04-28 09-35-12

hluk commented 4 years ago

Can this be a setting inside the preferences?

If you mean to have and option instead of manually setting QT_SCREEN_SCALE_FACTORS, it's not easy since this needs to be set before Qt application is initialized but the configuration can be access only after that initialization.

ThinkDigitalSoftware commented 4 years ago

Then it can require a restart

hluk commented 4 years ago

Them it can require a restart

The problem is that the configuration would need to end up in different file that I know about before instantiating application.

This looks like it would require too much effort to implement for all platforms. I'm not willing to spent too much time on implementing a workaround for an external issue that already has a relatively easy workaround.

scottkosty commented 4 years ago

Just as an outside opinion, I do not think this is something CopyQ should handle internally. CopyQ depends on Qt, and any common Qt settings should be done not at the individual level but at the system level. A distribution that packages CopyQ might decide to do it as a workaround, or Qt can provide a mechanism to make things easier, but I do not see any bug in CopyQ.