flameshot icon indicating copy to clipboard operation
flameshot copied to clipboard

Text is rendered incorrectly when using 200% scale

Open vdmit opened this issue 1 year ago • 4 comments

Flameshot Version

$ flameshot --version
Flameshot v11.0.0 (11.0.0-2 Debian)
Compiled with Qt 5.15.2

Installation Type

Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...)

Operating System type and version

Ubuntu 22.04.3 LTS

Description

I have a laptop plus standalone display with different scaling on each screen. Laptop has 1x scale, and 4k external display with 2x scale (200%). I prefer single-display mode.

When I start flameshot on laptop with disconnected display, all works fine, BUT when I connect it to display and switch to it, Flameshot renders texts incorrectly (texts could "fly away" from frame). And, vice versa, if I start flameshot in 200% mode and then switch to internal display, texts also will be mis-positioned.

I've found a simple workaround: just restart flameshot after monitor connection/disconnection, but this is boring.

Steps to reproduce

  1. configure 2-monitor mode with different screen scale and single-display mode screenshot-2023-12-06_11-29 (e.g. 100% and 200%)
  2. start flameshot
  3. change screen scale (e.g. by connecting /disconnecting external display)
  4. take a screenshot and try to draw some text
  5. After switching to another tool (or screen saving) text will be misplaced: to the left if scale has increased, and to the right if scale decreased.

Screenshots or screen recordings

Good screen: screenshot-2023-12-06_11-15 Bad screen after display switching: Screenshot from 2023-12-06 11-18-34

System Information

  • gnome 3
  • x.org (no wayland)
$ inxi --width 80 --system --graphics
System:
  Host: vdmit-ix Kernel: 6.2.0-37-generic x86_64 bits: 64 Desktop: GNOME 42.9
    Distro: Ubuntu 22.04.3 LTS (Jammy Jellyfish)
Use of uninitialized value in concatenation (.) or string at /usr/bin/inxi line 13826.
Graphics:
  Device-1: Intel Alder Lake-P Integrated Graphics driver: i915 v: kernel
  Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: modesetting
    unloaded: fbdev,vesa gpu: i915 s-res: 3840x2160~Hz resolution: 3840x2160
  OpenGL: renderer: Mesa Intel Graphics (ADL GT2)
    v: 4.6 Mesa 23.0.4-0ubuntu1~22.04.1
$ xrandr --listactivemonitors
Monitors: 1
 0: +*DP-3-2 3840/597x2160/336+0+0  DP-3-2

vdmit avatar Dec 06 '23 08:12 vdmit

I can confirm this is a problem. Same thing happens for me at 200%.

  • Flameshot 12.1.0
  • Xorg (no wayland)
  • Arch Linux, gnome version 45.

mschout avatar Jan 19 '24 18:01 mschout

Although, oddly enough, I recompiled it from source and the problem seems to have gone away. Strange.

mschout avatar Jan 19 '24 19:01 mschout

Same for me on Windows 10. Restarting Flameshot works.

Flameshot v12.1.0 (96c2c82e) Compiled with Qt 5.15.2 winnt: 10.0.19045 windows: 10

stevgouws avatar Mar 14 '24 11:03 stevgouws

It happens for me often. I think the reason "reinstalling" fixed it temporarily was that it was because it restarted.

mschout avatar Apr 09 '24 19:04 mschout