Dark mode: checkbox labels are shifted to right

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Dark mode: checkbox labels are shifted to right

Post by *Flint »

Here are a few screenshots:
Light mode, 64-bit
Dark mode, 64-bit
Light mode, 32-bit
Dark mode, 32-bit

You can see that between the checkbox and the text label there're only 3 pixels in light mode, but 5 to 7 (depending on the bitness) in the dark mode. Small as it may seem, it affects the translations: the text which fits fine in normal mode, becomes cut or overlapped in dark mode. (And in our translation there was found at least one such place.)

And even without translations, this is how the Search/Replace block in the Multi-Rename Tool looks in the dark mode:
Screenshot
The labels for the frist 3 checkboxes are much closer to the right checkbox than to the left one.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dark mode: checkbox labels are shifted to right

Post by *ghisler(Author) »

That's because the labels in dark mode are owner drawn. There is no method to determine the distance of the text when they are drawn by Windows. I'm using the height of the control as the position where the text starts. Please let me know if you have any better ideas.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Dark mode: checkbox labels are shifted to right

Post by *petermad »

How about the ceiling value of ½ of the height.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Re: Dark mode: checkbox labels are shifted to right

Post by *Flint »

2petermad
Won't work, probably. For me, the size of the checkbox is 13x13, the control height is 20. So if you start writing text at 10 pixels you'd overlap with the checkbox.


2ghisler(Author)
Could you, please, give some more details on the drawing of the control? Which base elements do you use? What properties of these elements you have access to?

Particularly, how is the actual box of the checkbox is drawn? The height of the control is, indeed, larger than the checkbox proper, but what is it's base width? Could you use it to get the rightmost position of the checkbox?
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
Post Reply