Skip to content

Fix rev tools light dark mode #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: OpenXTalk-develop-1.963.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 28 additions & 24 deletions IDE Bundle/Contents/Tools/Toolset/home.livecodescript
Original file line number Diff line number Diff line change
Expand Up @@ -2447,16 +2447,17 @@ on IDEToLightMode
--- for macOS ---
setAppToLightMode
-- setWindowToLightMode
set the backGroundColor of stack "revTools" to empty -- "Gray30"
set the foreGroundColor of stack "revTools" to empty -- "White"
-- set the backGroundColor of stack "revTools" to empty -- "Gray30"
-- set the foreGroundColor of stack "revTools" to empty -- "White"
dispatch "darkMode" to stack "revTools" with false, isMac
-- set the opaque of group "widget" of stack "revTools" to false
set the foreGroundColor of group "widget" of stack "revTools" to "Black"
set the backgroundColor of group "widget" of stack "revTools" to empty -- "Gray50"
set the foreGroundColor of group "background" of stack "revTools" to "White"
-- set the foreGroundColor of group "widget" of stack "revTools" to "Black"
-- set the backgroundColor of group "widget" of stack "revTools" to empty -- "Gray50" ? mdw
-- set the foreGroundColor of group "background" of stack "revTools" to "White"

-- set the opaque of group "classic" of stack "revTools" to true
-- set the foreGroundColor of group "classic" of stack "revTools" to "White"
set the backgroundColor of group "classic" of stack "revTools" to empty -- "Gray60"
-- set the backgroundColor of group "classic" of stack "revTools" to empty -- "Gray60" ? mdw

-- set the opaque of group "graphictoolscontrols" of stack "revTools" to true
-- set the backgroundColor of group "graphictoolscontrols" of stack "revTools" to "Gray25"
Expand All @@ -2474,12 +2475,13 @@ on IDEToLightMode
set the backgroundColor of stack "revPreferencesGUI" to "White"
set the foreGroundColor of stack "revPreferencesGUI" to "Black"
else
set the foreGroundColor of stack "revTools" to "Black"
set the backGroundColor of stack "revTools" to "White"
set the foreGroundColor of group "widget" of stack "revTools" to "Black"
set the backgroundColor of group "widget" of stack "revTools" to "White"
set the foreGroundColor of group "background" of stack "revTools" to "Black"
set the backgroundColor of group "classic" of stack "revTools" to "White"
dispatch "darkMode" to stack "revTools" with false, isMac
-- set the foreGroundColor of stack "revTools" to "Black"
-- set the backGroundColor of stack "revTools" to "White"
-- set the foreGroundColor of group "widget" of stack "revTools" to "Black"
-- set the backgroundColor of group "widget" of stack "revTools" to "White"
-- set the foreGroundColor of group "background" of stack "revTools" to "Black"
-- set the backgroundColor of group "classic" of stack "revTools" to "White"

if the systemVersion is "NT 10.0" then set the textColor of group "revMenuBar" of stack "revMenuBar" to "Black"
-- set the opaque of stack "revMenuBar" to false
Expand Down Expand Up @@ -2551,16 +2553,17 @@ on IDEToDarkMode
if isMac is true then
setAppToDarkMode
-- setWindowToDarkMode
set the backGroundColor of stack "revTools" to empty -- "Gray30"
set the foreGroundColor of stack "revTools" to empty -- "White"
-- set the backGroundColor of stack "revTools" to empty -- "Gray30"
-- set the foreGroundColor of stack "revTools" to empty -- "White"
dispatch "darkMode" to stack "revTools" with true, isMac
-- set the opaque of group "widget" of stack "revTools" to false
set the foreGroundColor of group "widget" of stack "revTools" to "White"
set the backgroundColor of group "widget" of stack "revTools" to empty -- "Gray50"
set the foreGroundColor of group "background" of stack "revTools" to "White"
--set the foreGroundColor of group "widget" of stack "revTools" to "White"
--set the backgroundColor of group "widget" of stack "revTools" to empty -- "Gray50"
--set the foreGroundColor of group "background" of stack "revTools" to "White"

-- set the opaque of group "classic" of stack "revTools" to true
-- set the foreGroundColor of group "classic" of stack "revTools" to "White"
set the backgroundColor of group "classic" of stack "revTools" to empty -- "Gray60"
--set the backgroundColor of group "classic" of stack "revTools" to empty -- "Gray60"

-- set the opaque of group "graphictoolscontrols" of stack "revTools" to true
-- set the backgroundColor of group "graphictoolscontrols" of stack "revTools" to "Gray25"
Expand All @@ -2579,12 +2582,13 @@ on IDEToDarkMode
set the foreGroundColor of stack "revPreferencesGUI" to "White"

else
set the foreGroundColor of stack "revTools" to "White"
set the backGroundColor of stack "revTools" to "Gray20"
set the foreGroundColor of group "widget" of stack "revTools" to "White"
set the backgroundColor of group "widget" of stack "revTools" to "Gray20"
set the foreGroundColor of group "background" of stack "revTools" to "White"
set the backgroundColor of group "classic" of stack "revTools" to "Gray20"
dispatch "darkMode" to stack "revTools" with true, isMac
-- set the foreGroundColor of stack "revTools" to "White"
-- set the backGroundColor of stack "revTools" to "Gray20"
-- set the foreGroundColor of group "widget" of stack "revTools" to "White"
-- set the backgroundColor of group "widget" of stack "revTools" to "Gray20"
-- set the foreGroundColor of group "background" of stack "revTools" to "White"
-- set the backgroundColor of group "classic" of stack "revTools" to "Gray20"

if the systemVersion is "NT 10.0" then set the textColor of group "revMenuBar" of stack "revMenuBar" to "Black"
-- set the opaque of stack "revMenuBar" to false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1285,3 +1285,39 @@ on moveStack
ideSetWindowBoundingRect
pass moveStack
end moveStack

# pass true for darkMode, false for lightMode
command darkMode pIsDark?, pIsMac?
local tForeGroundColor, tBackGroundColor, tStackForeGroundColor, tStackBackGroundColor

if pIsDark? then
put "White" into tForeGroundColor
if pIsMac? then
put empty into tStackForeGroundColor
put empty into tStackBackGroundColor
put empty into tBackGroundColor
else
put "White" into tStackForeGroundColor
put "Gray20" into tStackBackGroundColor
put "Gray20" into tBackGroundColor
end if
else
put "Black" into tForeGroundColor
if pIsMac? then
put empty into tStackForeGroundColor
put empty into tStackBackGroundColor
put empty into tBackGroundColor
else
put "Black" into tStackForeGroundColor
put "White" into tStackBackGroundColor
put "White" into tBackGroundColor
end if
end if

set the foreGroundColor of this stack to tStackForeGroundColor
set the backGroundColor of this stack to tStackBackGroundColor
set the foreGroundColor of group "widget" of this stack to tForeGroundColor
set the backgroundColor of group "widget" of this stack to tBackGroundColor
set the foreGroundColor of group "background" of this stack to tForeGroundColor
set the backgroundColor of group "classic" of this stack to tBackGroundColor
end darkMode
Loading