• Tk not respecting colour style in Win 10 dark mode?

    From Mike Griffiths@21:1/5 to All on Mon Nov 1 09:55:05 2021
    Hi all,

    Not able to test/play around with this directly as I'm on Win 7, but a user has reported that my Tk app doesn't respect the colour scheme from Dark Mode on Windows 10. Is anyone aware of this?

    We were able to manually configure most widget background colours to something suitably close to work around it for the most part, but the titlebar/menubar, for instance, remain the usual bright grey, which is problematic for the user in question who has
    light sensitivity.

    All of the extra Tk colours which are defined on Windows, such as SystemButtonFace, also seem to be the same on their system as they are on mine, which suggests these are using some hardcoded values rather than actually getting them from the Windows
    settings as you'd expect.

    Is there any way I'm not aware of to alter this, or would anyone agree that this is a bug in Tk?

    Thanks for your help,

    Mike

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Wed Nov 3 08:59:02 2021
    Am 01.11.2021 um 17:55 schrieb Mike Griffiths:
    Hi all,

    Not able to test/play around with this directly as I'm on Win 7, but a user has reported that my Tk app doesn't respect the colour scheme from Dark Mode on Windows 10. Is anyone aware of this?

    We were able to manually configure most widget background colours to something suitably close to work around it for the most part, but the titlebar/menubar, for instance, remain the usual bright grey, which is problematic for the user in question who
    has light sensitivity.

    All of the extra Tk colours which are defined on Windows, such as SystemButtonFace, also seem to be the same on their system as they are on mine, which suggests these are using some hardcoded values rather than actually getting them from the Windows
    settings as you'd expect.

    Is there any way I'm not aware of to alter this, or would anyone agree that this is a bug in Tk?

    Thanks for your help,

    Mike


    Mike,

    yes, Tk does not respect the Windows dark mode.
    I invite you to the awsome (and unfortunately abandoned) AWDark theme,
    which is great as dark mode. It has a lot of options. I mainly use it
    for Android...

    Take care,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Griffiths@21:1/5 to Harald Oehlmann on Wed Nov 3 14:28:48 2021
    On Wednesday, 3 November 2021 at 07:58:51 UTC, Harald Oehlmann wrote:
    Am 01.11.2021 um 17:55 schrieb Mike Griffiths:
    Hi all,

    Not able to test/play around with this directly as I'm on Win 7, but a user has reported that my Tk app doesn't respect the colour scheme from Dark Mode on Windows 10. Is anyone aware of this?

    We were able to manually configure most widget background colours to something suitably close to work around it for the most part, but the titlebar/menubar, for instance, remain the usual bright grey, which is problematic for the user in question who
    has light sensitivity.

    All of the extra Tk colours which are defined on Windows, such as SystemButtonFace, also seem to be the same on their system as they are on mine, which suggests these are using some hardcoded values rather than actually getting them from the Windows
    settings as you'd expect.

    Is there any way I'm not aware of to alter this, or would anyone agree that this is a bug in Tk?

    Thanks for your help,

    Mike

    Mike,

    yes, Tk does not respect the Windows dark mode.
    I invite you to the awsome (and unfortunately abandoned) AWDark theme,
    which is great as dark mode. It has a lot of options. I mainly use it
    for Android...

    Take care,
    Harald
    Hi Harald,

    Thanks for the reply, I'll look into AWDark. I assume that the actual window elements such as the menubar and title bar will remain in their default bright colours even with this, though? Is anyone aware of any way to configure these? I did try and look
    through TWAPI in case I could find anything for configuring it, but had no luck. Guessing there might be something if I dig through Windows APIs and look at lower-level calls but I know this gets messy if you configure things about a window separately as
    Tk redraws things in its own way after...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From lamuzzachiodi@gmail.com@21:1/5 to All on Wed Nov 3 17:18:10 2021
    I invite you to the awsome (and unfortunately abandoned) AWDark theme,

    According to https://wiki.tcl-lang.org/page/awthemes the current version is 10.4.0 of 2021-6-18.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alex Plotnikov@21:1/5 to All on Thu Nov 4 02:24:47 2021
    четверг, 4 ноября 2021 г. в 03:18:12 UTC+3, lamuzz...@gmail.com:
    I invite you to the awsome (and unfortunately abandoned) AWDark theme,
    According to https://wiki.tcl-lang.org/page/awthemes the current version is 10.4.0 of 2021-6-18.

    Hi Mike,

    The menu bar is indeed a capricious girl as for Tcl/Tk for Windows.

    Can your user move to Windows 10? It provides a nice set of themes, incl. dark ones.

    See, e.g., how "Mino Dark Green 6" theme of Windows 10 decorates alited editor. The editor is written in pure Tcl/Tk. In the screenshot, it uses its own "sun-valley-dark" theme (am sort of boasting:)

    https://aplsimple.github.io/en/tcl/alited/files/alited-win10.png

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From nemethi@21:1/5 to All on Thu Nov 4 12:50:23 2021
    Am 04.11.21 um 01:18 schrieb lamuzz...@gmail.com:
    I invite you to the awsome (and unfortunately abandoned) AWDark theme,

    According to https://wiki.tcl-lang.org/page/awthemes the current version is 10.4.0 of 2021-6-18.


    That is right, but, unfortunately, the package is abandoned, indeed.
    Its author Brad Lanam posted on the same day on this newsgroup:

    "... I will no longer be working with Tcl/Tk,
    and I will not be putting time into supporting various Tcl/Tk
    projects. I will no longer be paying attention to comp.lang.tcl."

    --
    Csaba Nemethi https://www.nemethi.de mailto:csaba.nemethi@t-online.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Griffiths@21:1/5 to Alex Plotnikov on Thu Nov 4 13:01:22 2021
    On Thursday, 4 November 2021 at 09:24:49 UTC, Alex Plotnikov wrote:
    четверг, 4 ноября 2021 г. в 03:18:12 UTC+3, lamuzz...@gmail.com:
    I invite you to the awsome (and unfortunately abandoned) AWDark theme,
    According to https://wiki.tcl-lang.org/page/awthemes the current version is 10.4.0 of 2021-6-18.
    Hi Mike,

    The menu bar is indeed a capricious girl as for Tcl/Tk for Windows.

    Can your user move to Windows 10? It provides a nice set of themes, incl. dark ones.

    See, e.g., how "Mino Dark Green 6" theme of Windows 10 decorates alited editor. The editor is written in pure Tcl/Tk. In the screenshot, it uses its own "sun-valley-dark" theme (am sort of boasting:)

    https://aplsimple.github.io/en/tcl/alited/files/alited-win10.png
    Hi Alex,

    The user is on Windows 10, but the app title bar and the menu bar are still a very old-school-style solid greyish in my Tcl/Tk app - if anything it looks more 'Classic Windows' there than it does on my Win 7 machine, not sure why. See https://i.imgur.com/
    PuWphYN.png for screenshots which show it using default colouring on the right, and with the highlighted code adapation on the left to recolour some widgets, which doesn't touch the window frame/menu.

    I'm not sure if there's a reason it has that look for them on Win 10 (a friend of theirs, also on Win 10 with dark mode settings in Windows, is seeing the same thing) or if there's anything I/the user can do about it?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alex Plotnikov@21:1/5 to All on Thu Nov 4 22:25:04 2021
    The user is on Windows 10, but the app title bar and the menu bar are still a very old-school-style solid greyish in my Tcl/Tk app - if anything it looks more 'Classic Windows' there than it does on my Win 7 machine, not sure why. See https://i.imgur.
    com/PuWphYN.png for screenshots which show it using default colouring on the right, and with the highlighted code adapation on the left to recolour some widgets, which doesn't touch the window frame/menu.

    I'm not sure if there's a reason it has that look for them on Win 10 (a friend of theirs, also on Win 10 with dark mode settings in Windows, is seeing the same thing) or if there's anything I/the user can do about it?

    Mike,

    Indeed looks bad. With icons in any case, Windows or not.
    Still, you didn't supply details (me too, though:), i.e.
    - what version of Tcl/Tk for Windows (mine is 8.6.8)
    - do you use tclsh or tclkit? or perhaps a stand-alone exe?
    - if it's tclkit, what's its origin?
    - do you use a specific package rendering GUI? or it's all core Tcl/Tk?
    - what Tk theme are you using? sincerely, I cannot recognize your Tk theme by your shots (because of their poor resolution)
    - did you try the recommended awdark theme?
    Ideally, you might drop a link to the sources to try it by others. Or at least, if it's not free, a part of it being enough to try.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alex Plotnikov@21:1/5 to All on Thu Nov 4 22:58:52 2021
    That is right, but, unfortunately, the package is abandoned, indeed.
    Its author Brad Lanam posted on the same day on this newsgroup:

    Hi Csaba,

    Ironically, Brad's one of interests is in GUI themes which isn't a coolest feature of his intended target to move, GTK.
    All in all, "never say never/no longer" seems to be the case.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alex Plotnikov@21:1/5 to All on Fri Nov 12 01:43:17 2021
    пятница, 5 ноября 2021 г. в 08:25:06 UTC+3, Alex Plotnikov:
    The user is on Windows 10, but the app title bar and the menu bar are still a very old-school-style solid greyish in my Tcl/Tk app - if anything it looks more 'Classic Windows' there than it does on my Win 7 machine, not sure why. See https://i.imgur.
    com/PuWphYN.png for screenshots which show it using default colouring on the right, and with the highlighted code adapation on the left to recolour some widgets, which doesn't touch the window frame/menu.

    I'm not sure if there's a reason it has that look for them on Win 10 (a friend of theirs, also on Win 10 with dark mode settings in Windows, is seeing the same thing) or if there's anything I/the user can do about it?
    Mike,

    Indeed looks bad. With icons in any case, Windows or not.
    Still, you didn't supply details (me too, though:), i.e.
    - what version of Tcl/Tk for Windows (mine is 8.6.8)
    - do you use tclsh or tclkit? or perhaps a stand-alone exe?
    - if it's tclkit, what's its origin?
    - do you use a specific package rendering GUI? or it's all core Tcl/Tk?
    - what Tk theme are you using? sincerely, I cannot recognize your Tk theme by your shots (because of their poor resolution)
    - did you try the recommended awdark theme?
    Ideally, you might drop a link to the sources to try it by others. Or at least, if it's not free, a part of it being enough to try.


    Mike,
    Did you try? Or it's somewhat of nothing for you?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alexandru@21:1/5 to Mike Griffiths on Fri Nov 12 19:47:26 2021
    Mike Griffiths schrieb am Montag, 1. November 2021 um 17:55:07 UTC+1:
    Hi all,

    Not able to test/play around with this directly as I'm on Win 7, but a user has reported that my Tk app doesn't respect the colour scheme from Dark Mode on Windows 10. Is anyone aware of this?

    We were able to manually configure most widget background colours to something suitably close to work around it for the most part, but the titlebar/menubar, for instance, remain the usual bright grey, which is problematic for the user in question who
    has light sensitivity.

    All of the extra Tk colours which are defined on Windows, such as SystemButtonFace, also seem to be the same on their system as they are on mine, which suggests these are using some hardcoded values rather than actually getting them from the Windows
    settings as you'd expect.

    Is there any way I'm not aware of to alter this, or would anyone agree that this is a bug in Tk?

    Thanks for your help,

    Mike

    I asked myself the same question after switching my Windows 10 to dark mode and realized that my Tcl/Tk app doesn't care about that change. Until now I thought the philosophy of Tcl/Tk is to adapt the looks and feel automatically to the current OS. Aside
    from the fact that AWDark is abandoned, I think the adaption to the theme belongs into the core. And it would be very cool to have that, since other apps such as Firefox also ignore the Windows theme.

    BTW: Is there a way in Tcl/Tk to get the current theme?

    Regards
    Alexandru

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Francois Vogel@21:1/5 to All on Sat Nov 13 09:15:01 2021
    Le 13/11/2021 à 04:47, Alexandru a écrit :
    BTW: Is there a way in Tcl/Tk to get the current theme?

    Yes.

    ttk::style theme use

    will return it.

    Regards,
    Francois

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)