I have an app that runs on Windows, macOS and Linux.
Unfortunately, neither the macOS nor the Linux versions play well with Dark Mode.
I've found out how to disable/ignore Dark Mode in macOS but does anyone know of a solution for Linux (Ubuntu)?
Ignoring Dark Mode
Re: Ignoring Dark Mode
With Linux, there is no switch for dark mode.
Here you have to change the CSS styles for the application. But I have not yet done this for Global for the application.
Here you have to change the CSS styles for the application. But I have not yet done this for Global for the application.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Ignoring Dark Mode
Its easy ...
Example to set dark theme. Works only with exiting theme names with '-dark'
Update
Link: GTK3-DarkMode
Example to set dark theme. Works only with exiting theme names with '-dark'
Update
Code: Select all
;- See Link
Last edited by mk-soft on Sun Dec 18, 2022 3:11 pm, edited 1 time in total.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Ignoring Dark Mode
mk-soft,
Thanks for the swift response.
You may have misread my first post. I'm not trying to apply Dark Mode globally, I'm trying to ignore Dark Mode locally!
I just removed the "Debug" reference and changed the
"*Theme = UTF8(ThemeName + "-dark")" line
to
"*Theme = UTF8(ThemeName + "-light")"
and it works like a charm!
Thanks so much. You wouldn't know how to do the same trick in Windows, would you?
Thanks for the swift response.
You may have misread my first post. I'm not trying to apply Dark Mode globally, I'm trying to ignore Dark Mode locally!
I just removed the "Debug" reference and changed the
"*Theme = UTF8(ThemeName + "-dark")" line
to
"*Theme = UTF8(ThemeName + "-light")"
and it works like a charm!
Thanks so much. You wouldn't know how to do the same trick in Windows, would you?
Re: Ignoring Dark Mode
But it could be that "xyz-light" does not exist. Then better remove "-dark". As in the example Procedure DarkMode()
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Ignoring Dark Mode
Nice. Very nice.
Thanks for that.
Thanks for that.
Re: Ignoring Dark Mode
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Ignoring Dark Mode
Thanks for that mk-soft but it doesn't seem to be working on my Ubuntu 20.04 setup.
If the system dark-mode is off the the buttons toggle the app's mode between dark and light as expected.
However, if the system's dark-mode is on then the buttons do nothing (i.e., the dark-mode remains on).
Any ideas?
If the system dark-mode is off the the buttons toggle the app's mode between dark and light as expected.
However, if the system's dark-mode is on then the buttons do nothing (i.e., the dark-mode remains on).
Any ideas?
Re: Ignoring Dark Mode
You are right.
Its default theme for application is dark then can not change to default-mode
Update !
also change application theme
or
Link: GTK3-DarkMode
Its default theme for application is dark then can not change to default-mode
Update !
also change application theme
Code: Select all
;SetThemeName("Mint-Y")
SetThemeName("Yaru")
Code: Select all
Define Theme.s
Theme = GetThemeName()
Theme = RemoveString(Theme, "-dark", #PB_String_NoCase)
SetThemeName(Theme)
If Not IsDarkMode()
SetDarkMode(#True)
EndIf
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive