marticliment / ElevenClock

ElevenClock: Customize Windows 11 taskbar clock
https://www.marticliment.com/elevenclock/
GNU General Public License v3.0
2.26k stars 172 forks source link

[BUG] Visual glitches on hidpi displays (especially after switching between different displays) #1332

Open dumblob opened 2 months ago

dumblob commented 2 months ago

Please confirm these before moving forward

Describe your issue

I noticed some visual glitches - see one of them in this picture:

image

Steps to reproduce the issue

  1. set up elevenclock to your liking and run it
  2. connect additional external display with a different resolution than the current one(s)
  3. set the external display as the only shown display
  4. set some higher dpi setting for the display (I used scaling factor 350)
  5. observe a glitch of elevenclock being repositioned to the very corner instead of a little margin)
  6. hover over elevenclock with a mouse to see the second glitch (see the attached picture)

ElevenClock Log

🟒 Using cached lang file
🟑 Using bundled lang file (forced=True)
It took 0.004184722900390625 to load all language files
---------------------------------------------------------------------------------------------------

   ElevenClock's 4.2.2 (v4.22) log: Select all the text and hit Ctrl+C to copy it
   All modules loaded successfully and sys.stdout patched correctly, starting main script
   Translator function set language to "en"

---------------------------------------------------------------------------------------------------

 Log legend:
 πŸ”΅: Verbose
 🟒: Information
 🟑: Warning
 🟠: Handled unexpected exception
 πŸ”΄: Unhandled unexpected exception
 🟣: Handled expected exception

πŸ”΅ Initializing clock 0...
πŸ”΅ Using taskbar background color
🟒 Regular sized taskbar
🟒 Clock on the bottom
🟒 Clock on the right
πŸ”΅ Clock geometry: PySide6.QtCore.QRect(970, 612, 200, 46)
πŸ”΅ Full screen rect:  (0, 0, 1170, 658)
πŸ”΅ Using automatic font color
πŸ”΅ Font families   : ['Segoe UI Variable Display', 'sans-serif']
πŸ”΅ Custom font     : 
πŸ”΅ Font size: 9.0
🟑 Custom loaded date time format (clock 0): %y%U.%w %H:%M\n%x
🟒 Loaded clocks in 1.541745901107788
πŸ”΅ Show/hide loop started with parameters: HideonFS:True, NotHideOnTB:False, DisableNotifications:True
πŸ”΅ Restart loop: 1
πŸ”΅ Language file up-to-date
🟑 restartClocks function has not been defined yet!
🟑 restartClocks function has not been defined yet!
🟑 restartClocks function has not been defined yet!
🟑 restartClocks function has not been defined yet!
🟠 Update checking disabled
πŸ”΅ Low cpu mode is set to False. DisableNotifications is set to False
🟒 Loaded everything in 6.630336761474609
πŸ”΅ Initializing clock 0...
πŸ”΅ Using taskbar background color
🟒 Regular sized taskbar
🟒 Clock on the bottom
🟒 Clock on the right
πŸ”΅ Clock geometry: PySide6.QtCore.QRect(970, 612, 200, 46)
πŸ”΅ Full screen rect:  (0, 0, 1170, 658)
πŸ”΅ Using automatic font color
πŸ”΅ Font families   : ['Segoe UI Variable Display', 'sans-serif']
πŸ”΅ Custom font     : 
πŸ”΅ Font size: 9.0
🟑 Custom loaded date time format (clock 0): %y%U.%w %H:%M\n%x
πŸ”΅ Show/hide loop started with parameters: HideonFS:True, NotHideOnTB:False, DisableNotifications:True
πŸ”΅ Restart loop: 1
πŸ”΅ Initializing clock 0...
πŸ”΅ Using taskbar background color
🟒 Regular sized taskbar
🟒 Clock on the bottom
🟒 Clock on the right
πŸ”΅ Clock geometry: PySide6.QtCore.QRect(1507, 914, 200, 46)
πŸ”΅ Full screen rect:  (0, 0, 1707, 960)
πŸ”΅ Using automatic font color
πŸ”΅ Font families   : ['Segoe UI Variable Display', 'sans-serif']
πŸ”΅ Custom font     : 
πŸ”΅ Font size: 9.0
πŸ”΅ Restart loop: 1
🟑 Custom loaded date time format (clock 0): %y%U.%w %H:%M\n%x
πŸ”΅ Show/hide loop started with parameters: HideonFS:True, NotHideOnTB:False, DisableNotifications:True
πŸ”΅ Initializing clock 0...
πŸ”΅ Using taskbar background color
🟒 Regular sized taskbar
🟒 Clock on the bottom
🟒 Clock on the right
πŸ”΅ Clock geometry: PySide6.QtCore.QRect(1507, 914, 200, 46)
πŸ”΅ Full screen rect:  (0, 0, 1707, 960)
πŸ”΅ Using automatic font color
πŸ”΅ Font families   : ['Segoe UI Variable Display', 'sans-serif']
πŸ”΅ Custom font     : 
πŸ”΅ Font size: 9.0
πŸ”΅ Restart loop: 1
🟑 Custom loaded date time format (clock 0): %y%U.%w %H:%M\n%x
πŸ”΅ Show/hide loop started with parameters: HideonFS:True, NotHideOnTB:False, DisableNotifications:True
πŸ”΅ Initializing clock 0...
πŸ”΅ Using taskbar background color
🟒 Regular sized taskbar
🟒 Clock on the bottom
🟒 Clock on the right
πŸ”΅ Clock geometry: PySide6.QtCore.QRect(1080, 674, 200, 46)
πŸ”΅ Full screen rect:  (0, 0, 1280, 720)
πŸ”΅ Using automatic font color
πŸ”΅ Font families   : ['Segoe UI Variable Display', 'sans-serif']
πŸ”΅ Custom font     : 
πŸ”΅ Font size: 9.0
🟑 Custom loaded date time format (clock 0): %y%U.%w %H:%M\n%x
πŸ”΅ Restart loop: 1
πŸ”΅ Show/hide loop started with parameters: HideonFS:True, NotHideOnTB:False, DisableNotifications:True
🟠 Update checking disabled
πŸ”΅ Restart loop: 1
πŸ”΅ Initializing clock 0...
πŸ”΅ Using taskbar background color
🟒 Regular sized taskbar
🟒 Clock on the bottom
🟒 Clock on the right
πŸ”΅ Clock geometry: PySide6.QtCore.QRect(1080, 674, 200, 46)
πŸ”΅ Full screen rect:  (0, 0, 1280, 720)
πŸ”΅ Using automatic font color
πŸ”΅ Font families   : ['Segoe UI Variable Display', 'sans-serif']
πŸ”΅ Custom font     : 
πŸ”΅ Font size: 9.0
🟑 Custom loaded date time format (clock 0): %y%U.%w %H:%M\n%x
πŸ”΅ Show/hide loop started with parameters: HideonFS:True, NotHideOnTB:False, DisableNotifications:True
πŸ”΅ Initializing clock 0...
πŸ”΅ Using taskbar background color
🟒 Regular sized taskbar
🟒 Clock on the bottom
🟒 Clock on the right
πŸ”΅ Clock geometry: PySide6.QtCore.QRect(897, 571, 200, 46)
πŸ”΅ Full screen rect:  (0, 0, 1097, 617)
πŸ”΅ Restart loop: 1
πŸ”΅ Using automatic font color
πŸ”΅ Font families   : ['Segoe UI Variable Display', 'sans-serif']
πŸ”΅ Custom font     : 
πŸ”΅ Font size: 9.0
🟑 Custom loaded date time format (clock 0): %y%U.%w %H:%M\n%x
πŸ”΅ Show/hide loop started with parameters: HideonFS:True, NotHideOnTB:False, DisableNotifications:True
πŸ”΅ Showing tooltip
πŸ”΅ Long date string: dddd, MMMM d, yyyy
πŸ”΅ Showing tooltip
πŸ”΅ Long date string: dddd, MMMM d, yyyy
πŸ”΅ Showing tooltip
πŸ”΅ Long date string: dddd, MMMM d, yyyy
Action: ('win', 'n')
πŸ”΅ Showing tooltip
πŸ”΅ Long date string: dddd, MMMM d, yyyy
Action: ('win', 'n')
πŸ”΅ Showing tooltip
πŸ”΅ Long date string: dddd, MMMM d, yyyy
πŸ”΅ Showing tooltip
πŸ”΅ Long date string: dddd, MMMM d, yyyy
Action: ('win', 'n')
Action: ('win', 'n')
πŸ”΅ Showing tooltip
πŸ”΅ Long date string: dddd, MMMM d, yyyy
πŸ”΅ Showing tooltip
πŸ”΅ Long date string: dddd, MMMM d, yyyy
πŸ”΅ Showing tooltip
πŸ”΅ Long date string: dddd, MMMM d, yyyy
Action: ('win', 'n')
Action: ('win', 'n')
Action: ('win', 'n')
Action: ('win', 'n')
Action: ('win', 'n')
πŸ”΅ Showing tooltip
πŸ”΅ Long date string: dddd, MMMM d, yyyy
Action: ('win', 'n')
πŸ”΅ Showing tooltip
πŸ”΅ Long date string: dddd, MMMM d, yyyy
πŸ”΅ Announcement URL: https://www.marticliment.com/resources/elevenclock.announcement
πŸ”΅ Image URL: https://marticliment.com/resources/translate.png
πŸ”΅ Copying log to the clipboard...

Relevant information

No response

Screenshots and videos

No response

marticliment commented 2 months ago

Please do:

  1. Right-click the affected clock -> Clock Tools -> Settings for this clock
  2. On the shown window. Check "Set Clock {x} to have different style..."
  3. Clock position and size -> Adjust minimum clock width -> Increase min speed until clock has the correct size
dumblob commented 2 months ago

Hi @marticliment, thanks for the prompt and clear tip!

I have followed your steps and it helps:

image

Yet, then I noticed that the culprit is not the position, but the notification badge which does not have any reserved space and thus if there is a notification, I cannot see e.g. the battery or there is some other "glitch":

image

So I think this bug is not about hidpi but about the fact that when the setting to show badges is turned on, then there is no reserved space in case no notifications are to be shown.

Could this "reserve space for a badge" be implemented?


As a side note when setting the position, the number seems in pixels and thus if the user switches to a different font DPI (scaling factor), then the clock do not position themself properly (e.g. every time one disconnects a laptop from an external LCD).

Hence would it be possible to make the position sliders DPI independent?

marticliment commented 2 months ago

Will try