Dark Mode on and off: different msgbox box sizes, copied style and translation

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

Moderators: sheep, Hacker, Stefan2, white

User avatar
DrShark
Power Member
Power Member
Posts: 1582
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *DrShark »

I expect that this may be intentional, but it's better to ask to be sure.

So, on Vista 32-bit with classic theme I get following
sizes of some message boxes:

1. OK msgbox, with Not Found msgbox in Lister as example:
* dark mode off: 144 x 128 px;
* dark mode on: 400 x 139 px.

2. Yes/No/Cancel msgbox, with Shift+Delete dialog as example:
* dark mode off: 367 x 147 px;
* dark mode on: 400 x 139 px.

3. Yes/No msgbox, with one from Copy dialog mentioned in this post:
* dark mode off: 375 x 147 px;
* dark mode on: 400 x 139 px.

So, message boxes size used in dark mode is always 400 x 139 pixels.

Style text copied using Ctrl+C from above message boxes with dark mode off and on is also different:
* with dark mode off:

Code: Select all

---------------------------
Permanently delete
---------------------------
Do you really want to delete the selected directory c?
---------------------------
Да   Нет   Отмена   
---------------------------
* with dark mode on:

Code: Select all

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

Permanently delete

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

Do you really want to delete the selected directory c?

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

Yes   No   Cancel   
---------------------------
So, message boxes copied in dark mode with Ctrl+C have some additional empty lines between "---------------------------" lines and following text lines.

Translation of buttons text copied using Ctrl+C from above message boxes is also applied depending on dark mode.
I use built-in English as Total Commander language, and my Windows language is Russian, so it's expected that by default TC will translate messages to English. And all the text in actual messages it's translated to English. But, as you can see in above text of "Permanently delete" msgboxes, the text of dialog buttons Yes, No and Cancel copied with Ctrl+C with dark mode disabled is translated to Russian Да, Нет and Отмена (edit: the right to say here that the copied text unexpectedly is not translated to English, a language of TC). The same happens also with OK and Yes/No message boxes.
Last edited by DrShark on 2019-11-19, 10:25 UTC, edited 1 time in total.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
petermad
Power Member
Power Member
Posts: 9714
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *petermad »

I
Translation of buttons text copied using Ctrl+C from above message boxes is also applied depending on dark mode.
I use built-in English as Total Commander language, and my Windows language is Russian, so it's expected that by default TC will translate messages to English. And all the text in actual messages it's translated to English. But, as you can see in above text of "Permanently delete" msgboxes, the text of dialog buttons Yes, No and Cancel copied with Ctrl+C with dark mode disabled is translated to Russian Да, Нет and Отмена. The same happens also with OK and Yes/No message boxes.
In order for you to have Russian buttontext in Default English TC to must have TranslateMessageButtons=0 set in your wincmd.ini file (default is 1).

I can confirm that TranslateMessageButtons=0 is NOT respected in Dark mode, but that Buttontext is translated to English despite this setting.
License #524
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.988 (x64)
TC 3.01b6 on Android 6.0
Get:
Extended TC Menus | TC Languagebar | TC Dark Help | PHSM-Calendar

User avatar
DrShark
Power Member
Power Member
Posts: 1582
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *DrShark »

petermad wrote:
2019-11-19, 10:23 UTC
In order for you to have Russian buttontext in Default English TC to must have ...
I just edited my starting post (see edit: remark) to emphasize the nature of a problem:
* TranslateMessageButtons parameter doesn't exist in wincmd.ini, which means TranslateMessageButtons=1;
* TC language is built-in English, Windows language is Russian;
* Message box itself has English buttons text, no matter whether dark mode is off or on;
* with dark mode off, a in a text copied from msgbox with Ctrl+C, the text of buttons is Russian, in other words - NOT translated to language used in TC (English).
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
petermad
Power Member
Power Member
Posts: 9714
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *petermad »

* Message box itself has English buttons text, no matter whether dark mode is off or on;
* with dark mode off, a in a text copied from msgbox with Ctrl+C, the text of buttons is Russian
I can confirm this also for Danish Windows for both 32bit and 64bit TC 9.5b5 - so actually a bug in Normal mode.
License #524
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.988 (x64)
TC 3.01b6 on Android 6.0
Get:
Extended TC Menus | TC Languagebar | TC Dark Help | PHSM-Calendar

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39812
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *ghisler(Author) »

The dark mode message box is NOT a Windows MessageBox function. I wasn't able to change the color of the regular MessageBox. Instead, it's a Delphi/Lazarus dialog box, like the other dialog boxes (e.g. F5 copy). Therefore the dimensions will be completely different from a Windows MessageBox, and it will also always use the language you set in Total Commander regardless of the value of TranslateMessageButtons. TC has no way to find out the button texts of your local Windows installation.
Author of Total Commander
http://www.ghisler.com

User avatar
petermad
Power Member
Power Member
Posts: 9714
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *petermad »

2ghisler(Author)
Yes, but in this case it is in NORMAL mode, that not the button itself, but the text copied with Ctrl+C shows the System language in stead of TC language
License #524
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.988 (x64)
TC 3.01b6 on Android 6.0
Get:
Extended TC Menus | TC Languagebar | TC Dark Help | PHSM-Calendar

User avatar
Dalai
Power Member
Power Member
Posts: 7191
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *Dalai »

2petermad
Please note that the Ctrl+C shortcut is handled within the MessageBox Win32 API function, and AFAIK dialogs created by this function use the system language for the buttons - and it has always been this way, in TC and other programs.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups

User avatar
DrShark
Power Member
Power Member
Posts: 1582
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *DrShark »

ghisler(Author) wrote:
2019-11-19, 15:21 UTC
The dark mode message box is NOT a Windows MessageBox function. I wasn't able to change the color of the regular MessageBox. Instead, it's a Delphi/Lazarus dialog box, like the other dialog boxes (e.g. F5 copy). Therefore the dimensions will be completely different from a Windows MessageBox
No questions about color. About sizes: did you try to figure out how Windows decides what sizes to use for its message boxes, to use same method for Total Commander own message boxes used in dark mode?

Also you didn't comment extra empty lines that appear in text copied from message boxes in dark mode. Is their presence intentional, or you'll consider to remove them so copied text will look more like one copied from system msgbox in normal mode?
ghisler(Author) wrote:
2019-11-19, 15:21 UTC
and it will also always use the language you set in Total Commander regardless of the value of TranslateMessageButtons. TC has no way to find out the button texts of your local Windows installation.
OK, but since I doubt most users will distinguish messageboxes from Windows and Total Commander, I suggest to add this info to Help file near description of TranslateMessageButtons parameter, something like
help text suggestion wrote:TranslateMessageButtons=1 Translate buttons in standard MessageBox dialog (e.g. when deleting with Shift+Del) to the language set in Total Commander. Otherwise they use the language of the operating system. Parameter isn't used in dark mode where Total Commander uses own dialogs for message boxes.
Dalai wrote:
2019-11-19, 18:19 UTC
Ctrl+C shortcut is handled within the MessageBox Win32 API function, and AFAIK dialogs created by this function use the system language for the buttons - and it has always been this way, in TC and other programs.
Well, since both dialog and Ctrl+C are handled by same system function and TC is able to change the text of buttons in that dialog, let's hope TC will be able to change it also in text copied with Ctrl+C...
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39812
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *ghisler(Author) »

Also you didn't comment extra empty lines that appear in text copied from message boxes in dark mode.
This was a bug, it should be fixed in beta 6!
Author of Total Commander
http://www.ghisler.com

User avatar
DrShark
Power Member
Power Member
Posts: 1582
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *DrShark »

history950.txt wrote:20.11.19 Fixed: Dark mode: Ctrl+C in message box added extra lines by mistake (32/64)
I can confirm this fix. However, here on Vista 32-bit with classic theme in TC 9.50 beta 6 I have to press Ctrl+C twice to copy the text of dark mode msgbox, and there is no short sound while copying text in dark more, but such sound plays here if I press Ctrl+C in system message boxes when the dark mode is disabled.
petermad wrote:
2019-11-19, 10:23 UTC
I can confirm that TranslateMessageButtons=0 is NOT respected in Dark mode, but that Buttontext is translated to English despite this setting.
ghisler(Author) wrote:
2019-11-19, 15:21 UTC
The dark mode message box is NOT a Windows MessageBox function ... it will also always use the language you set in Total Commander regardless of the value of TranslateMessageButtons. TC has no way to find out the button texts of your local Windows installation.
Do *.lng or *.mnu files of Total Commander translation files have strings for translation of OK, Cancel, Yes, No buttons text? If yes, maybe for dark mode you when TranslateMessageButtons=0 you can use TC language files that match Windows language to translate such buttons, of course if such language files intalled with Total Commander?
ghisler(Author) wrote:
2019-11-19, 15:21 UTC
Therefore the dimensions will be completely different from a Windows MessageBox
Is this a final decision which is not going to be changed or there is a chance in future the dark mode msgboxes dimensions will follow system msgbox dimensions?
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
petermad
Power Member
Power Member
Posts: 9714
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *petermad »

Do *.lng or *.mnu files of Total Commander translation files have strings for translation of OK, Cancel, Yes,
Yes
License #524
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.988 (x64)
TC 3.01b6 on Android 6.0
Get:
Extended TC Menus | TC Languagebar | TC Dark Help | PHSM-Calendar

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39812
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *ghisler(Author) »

here on Vista 32-bit with classic theme in TC 9.50 beta 6 I have to press Ctrl+C twice to copy the text of dark mode msgbox
Not confirmed.
there is no short sound while copying text in dark more
I will add it, thanks!
Author of Total Commander
http://www.ghisler.com

User avatar
DrShark
Power Member
Power Member
Posts: 1582
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *DrShark »

ghisler(Author) wrote:
2019-11-25, 11:34 UTC
here on Vista 32-bit with classic theme in TC 9.50 beta 6 I have to press Ctrl+C twice to copy the text of dark mode msgbox
Not confirmed.
I just tried in Lister to find several words that don't exist in text file to get Not Found msgboxes, and each time tried to copy "Not Found" msgbox text with Ctrl+C and paste to text editor, with dark mode enabled and disabled. With disabled dark mode message box text is always copied after pressing Ctrl+C in msgbox first time. With dark mode enabled, sometimes it is being copied after first Ctrl+C keypress, and sometimes I have to press Ctrl+C twice...

Can anyone else confirm this?
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
DrShark
Power Member
Power Member
Posts: 1582
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *DrShark »

history950.txt wrote:25.11.19 Fixed: Ctrl+C in dark mode message box didn't beep (32/64)
I can confirm there is a beep now when msgbox content is actually copied with Ctrl+C.

Regarding the issue Ctrl+C sometimes not working in dark mode msgbox, I sent a video in email with subject:
TC95b7 dark mode, msgbox copy fail issue

To reduce video size, I didn't record audio, so no beeps there, but I used keys recording tool Carnac to show indication of Ctrl+C copy. Actually, when Ctrl+C fails to copy msgbox text, there is no beep, so this beep addition is helpful.
Android 4.3.1 no root, kernel 08.09.2016; Win7 Home Premium SP1 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 39812
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dark Mode on and off: different msgbox box sizes, copied style and translation

Post by *ghisler(Author) »

Unfortunately I cannot reproduce the failed Ctrl+C. Maybe some other program is locking the clipboard?
Author of Total Commander
http://www.ghisler.com

Post Reply