OXT Lite Moving Forward
Forum rules
A place to discuss and plan OpenSource xTalk (not exclusively LCC based) and Community Builds of LCC
Ask NOT what xTalk can do for you... get involved you DO have something to contribute, no matter your skillset!
A place to discuss and plan OpenSource xTalk (not exclusively LCC based) and Community Builds of LCC
Ask NOT what xTalk can do for you... get involved you DO have something to contribute, no matter your skillset!
- tperry2x
- Posts: 1690
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Britain (Previously known as Great Britain)
- Contact:
Re: OXT Lite Moving Forward
Haha, that's probably my Dad's influence. He's from Essex
I wasn't born there. I'm a norfolk boy. Blast me, he's a rumm'n.
Although, to be classed a local, at least 4 generations would have had to live here. So I'm a strange old mix I suppose.
I wasn't born there. I'm a norfolk boy. Blast me, he's a rumm'n.
Although, to be classed a local, at least 4 generations would have had to live here. So I'm a strange old mix I suppose.
- tperry2x
- Posts: 1690
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Britain (Previously known as Great Britain)
- Contact:
Re: OXT Lite Moving Forward
Oh yeah, that is weird. I'd expected your windows to be in dark mode, so I have no idea what's happening there.
This better explains where I'm at with Mac theming: This is because I can't change the background colour on the popup menu button. It plain won't let me, which is most infuriating.
This better explains where I'm at with Mac theming: This is because I can't change the background colour on the popup menu button. It plain won't let me, which is most infuriating.
- richmond62
- Posts: 2910
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OXT Lite Moving Forward
Neither a log out or a restart returned my menu bar to Light mode!
Sorry: 11 pm round these parts: off to have a bath.
Sorry: 11 pm round these parts: off to have a bath.
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 1690
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Britain (Previously known as Great Britain)
- Contact:
Re: OXT Lite Moving Forward
I've seen this before... [has a rummage around various notes]...richmond62 wrote: ↑Sun Nov 05, 2023 9:13 pm Neither a log out or a restart returned my menu bar to Light mode!
You could try these terminal commands:
Code: Select all
defaults write -g NSRequiresAquaSystemAppearance -bool No
If that doesn't work, try:
Code: Select all
defaults delete -g NSRequiresAquaSystemAppearance
Log back in and see if Dark mode will let you reapply it again.
- richmond62
- Posts: 2910
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OXT Lite Moving Forward
That makes me feel like Napoleon: "Not tonight, Josephine."
As have to be up early tomorrow, get my Primary School smile set out of the fridge, and it's 'Hey-ho' for the joys of Conditional sentences.
However: having a longish lunch break tomorrow I will see what happens on MacOS 14 Sonoma.
As have to be up early tomorrow, get my Primary School smile set out of the fridge, and it's 'Hey-ho' for the joys of Conditional sentences.
However: having a longish lunch break tomorrow I will see what happens on MacOS 14 Sonoma.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 2910
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OXT Lite Moving Forward
So: here I am in front of my 2018 Mac Mini running MacOS 14/2 beta something-or-other.
Lightmode still playing 'silly buggers' with the Men Bar staying Dark come what may.
BUT 0.93 IS switching into Dark Mode after about 30 seconds!
- -
BUT this is problematic.
- -
The drop-down is super.
Lightmode still playing 'silly buggers' with the Men Bar staying Dark come what may.
BUT 0.93 IS switching into Dark Mode after about 30 seconds!
- -
BUT this is problematic.
- -
The drop-down is super.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 2910
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OXT Lite Moving Forward
Richmond Fantasy Mode cranks up out of control:
PseudoCode:
PseudoCode:
Code: Select all
on openStack
if Mode is dark then
set the textColor of btn "Plonk" to black
end if
end openStack
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 2910
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OXT Lite Moving Forward
If this is true, then why is that card not hidden away?
-
-
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 1690
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Britain (Previously known as Great Britain)
- Contact:
Re: OXT Lite Moving Forward
I'm only going by what was there before, so I just removed line 2 of that dialog which mentioned buying livecode, and then made the text font larger. I also took away the link, so clicking the banner doesn't go to their purchase page.
I know for certainty there was a period where Apple wouldn't allow anything on their app store that hadn't been produced from any other source than via xCode.
I'm not sure if that's still true, but then LC 9.6.3 doesn't seem to have build targets for anything past iOS8. It would be lovely to get this updated so it's aware of iPadOS / iPhone OS (or iOS 11 at least).
I'd also like to keep the iOS standalone settings intact for another reason: I'm interested to know how iOS standalones will run on the desktop ARM version of MacOS, as they can be double-clicked like any normal Mac desktop app. This would prove a useful route into building apps for Arm macs in the future.
- tperry2x
- Posts: 1690
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Britain (Previously known as Great Britain)
- Contact:
Re: OXT Lite Moving Forward
You can detect if the OS is in light or dark mode with:richmond62 wrote: ↑Mon Nov 06, 2023 8:35 amCode: Select all
on openStack if Mode is dark then set the textColor of btn "Plonk" to black end if end openStack
Code: Select all
send tDarkLightCheck to stack "revMenuBar" in 1 tick
as taken from: /Toolset/libraries/revideextensionlibrary.livecodescript
as appropriate.
It then looks in/Toolset/home.livecodescript and performs manual colour overrides if needed (much like your sudocode)
Code: Select all
on IDEToLightMode
lock screen
if the platform contains "linux" then tApplyTheme_Linux_Light
if the platform contains "mac" then tApplyTheme_Mac_Light
if the platform contains "win" then tApplyTheme_Win_Light
unlock screen
end IDEToLightMode
on IDEToDarkMode
lock screen
if the platform contains "linux" then tApplyTheme_Linux_Dark
if the platform contains "mac" then tApplyTheme_Mac_Dark
if the platform contains "win" then tApplyTheme_Win_Dark
unlock screen
end IDEToDarkMode
If the platform turns out to be Mac, then it runs the handler setAppToDarkMode in /Toolchain/modules/lci/org.openxtalk.library.macosnativeapptools.lci, which is where Paul's org.openxtalk.library.macosnativeapptools/macOStools.lcb comes in.
Anyway, the short version is, you can manually try toggling between all of this by using:
Code: Select all
send IDEToDarkMode to stack "home"
Code: Select all
send IDEToLightMode to stack "home"
Also, you can set that behaviour on a normal button. You can't set it on the "option menu" object, which is what I'm banging on about here https://www.openxtalk.org/forum/viewtop ... 4461#p4461
Please feel free to have a dabble with my appearance stack and see what results you get. Thanks for testing! Turning the sudocode into script, it's something like:
Code: Select all
lock screen
-- you can force colour overrides with
put 255,255,255 into tNewForegroundCol -- white
put 31,31,31 into tNewBackgroundCol -- dark grey
-- set to all windows
put the mainstacks & return & the openstacks into tStackList
put 0 into tcount
repeat the number of lines in tStackList
add 1 to tcount
if there is a stack (line tcount of tStackList) then
set the backgroundColor of stack (line tcount of tStackList) to tNewBackgroundCol
set the foregroundColor of stack (line tcount of tStackList) to tNewForegroundCol
end if
end repeat
put "" into tStackList
-- anything else specifically? (specify in this format!) -- this is ugly, but it works
put "set the backgroundColor of card " & QUOTE & "main" & QUOTE & " of stack " & QUOTE & "revSETemplate" & QUOTE & " of stack " & QUOTE & "revNewScriptEditor" & QUOTE & " to tNewBackgroundCol" into line (the number of lines in tStackList +1) of tStackList
put "set the foregroundColor of card " & QUOTE & "main" & QUOTE & " of stack " & QUOTE & "revSETemplate" & QUOTE & " of stack " & QUOTE & "revNewScriptEditor" & QUOTE & " to tNewForegroundCol" into line (the number of lines in tStackList +1) of tStackList
set the cAppearanceBackgroundCol of stack "revPreferences" to tNewBackgroundCol
set the cAppearanceForegroundCol of stack "revPreferences" to tNewForegroundCol
filter lines of tStackList without empty
do tStackList
unlock screen
- richmond62
- Posts: 2910
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OXT Lite Moving Forward
Thanks for testing.
Busy testing my patience at the moment: tomorrow morning!
-
Busy testing my patience at the moment: tomorrow morning!
-
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 1690
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Britain (Previously known as Great Britain)
- Contact:
Re: OXT Lite Moving Forward
Okay, one thing that's just occurred to me.
Can you also download the new prefs stack here, and replace the existing one in your build.
viewtopic.php?p=4470#p4470
The reason is that as well as containing the bug fix, it gets rid of any manually set colour the stack previously had.
Can you also download the new prefs stack here, and replace the existing one in your build.
viewtopic.php?p=4470#p4470
The reason is that as well as containing the bug fix, it gets rid of any manually set colour the stack previously had.
- richmond62
- Posts: 2910
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OXT Lite Moving Forward
Well, as a real sadist, as it is 8.30 in England: here's something to make you sputter your coffee all over the place:
- - -
Those buttons . . .
- - -
Those buttons . . .
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 2910
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OXT Lite Moving Forward
Something wrong with inheritance, methinks:
-
Code: Select all
on mouseUp
set the backGroundColor of this stack to 50,50,50
set the foreGroundColor of this stack to 217,217,217
end mouseUp
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 2910
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OXT Lite Moving Forward
And HERE is why you got 'things' wrong:
Nifty thing here: https://htmlcolorcodes.com/
- -
NOW I shall HACK YOUR STACK
Nifty thing here: https://htmlcolorcodes.com/
- -
Code: Select all
on mouseUp
set the backGroundColor of this stack to empty
set the foreGroundColor of this stack to empty
set the backGroundColor of this stack to 42,117,16
set the foreGroundColor of this stack to 42,117,16
end mouseUp
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 2910
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OXT Lite Moving Forward
Ouch: does somethings successfully, but hoses 2 of your buttons:
- -
OK:
Makes your 'bottom' buttons lose their texts.
Makes your 'bottom' buttons readable, but makes you 2 top buttons vanish.
Told you, you'd choke on your coffee.
This WAS BECAUSE your 2 top buttons had '3D' turned off:
- -
The only shag about this is if the end user decides they don't like 3D buttons.
- -
OK:
Code: Select all
if tAppearanceMode contains "dark" then
-- dark mode
put "0,0,0" into tNewBackgroundCol
put "255,255,255" into tNewForegroundCol
Code: Select all
if tAppearanceMode contains "dark" then
-- dark mode
put "0,0,0" into tNewBackgroundCol
put "0,0,0" into tNewForegroundCol
Told you, you'd choke on your coffee.
This WAS BECAUSE your 2 top buttons had '3D' turned off:
- -
The only shag about this is if the end user decides they don't like 3D buttons.
- Attachments
-
- Richmond.zip
- Hacked Appearance stack
- (4.18 KiB) Downloaded 68 times
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 2910
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OXT Lite Moving Forward
This is, also, a load of old cobblers (resulting from my hack):
- -
I cannot work out how to set the backGroundColor and the textColor of either fields or buttons globally.
- -
I cannot work out how to set the backGroundColor and the textColor of either fields or buttons globally.
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 1690
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Britain (Previously known as Great Britain)
- Contact:
Re: OXT Lite Moving Forward
Hi Richmond.
Sorry, been out 'of it' today - it's exams time at the school, only mocks, but means I'm really busy and don't have much time to spend on Oxt for a while.
Thanks for your testing. To really fry your noggin, try with adding a popup menu. (Which can't be themed).
Buttons and fields also change when Paul's dark mode plugin loads, but not by much.
It's like the MacOS theme doesn't agree with Livecode's behaviour. It does change the buttons significantly between MacOS versions (see in MacOs 10.9 for comparison), but still not correct.
Makes me want to use 'sudo buttons' - pngs which match the system theme. And just drop those in instead depending on MacOS version
Sorry, been out 'of it' today - it's exams time at the school, only mocks, but means I'm really busy and don't have much time to spend on Oxt for a while.
Thanks for your testing. To really fry your noggin, try with adding a popup menu. (Which can't be themed).
Buttons and fields also change when Paul's dark mode plugin loads, but not by much.
It's like the MacOS theme doesn't agree with Livecode's behaviour. It does change the buttons significantly between MacOS versions (see in MacOs 10.9 for comparison), but still not correct.
Makes me want to use 'sudo buttons' - pngs which match the system theme. And just drop those in instead depending on MacOS version
- richmond62
- Posts: 2910
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OXT Lite Moving Forward
I do not envy you: being my own boss, and running a private language school (i.e. EFL to children between 6 and 17), I have no official exams to fuss about (90% of those who last 10 years go onto take the Cambridge Advanced test of English, which they all pass).
The INHERITANCE problem is a very real problem, and I have brought it up several times: the latest of which is here:
https://forums.livecode.com/viewtopic.php?f=7&t=38670
Fields and Buttons generally do NOT inherit the backGroundColor from the stack or the card!
So Theming has to be effected in some other way if one wants to transform the whole IDE rather than just the MenuBar and the Tools.
The problem is that while LiveCode and following is object-based it is not object-oriented, so strict inheritance is not present, and I do not think there is a way to enforce it.
And, after a "fool about" (It being Wednesday, my non-teaching day, Hip, Hip, Hooray), I found that a field will have what it termed its 'effective backGroundColor' inherited from the stack or the card, but 'effective' is singularly ineffective as the flaming field stays white!
textColor IS inherited.
The INHERITANCE problem is a very real problem, and I have brought it up several times: the latest of which is here:
https://forums.livecode.com/viewtopic.php?f=7&t=38670
Fields and Buttons generally do NOT inherit the backGroundColor from the stack or the card!
So Theming has to be effected in some other way if one wants to transform the whole IDE rather than just the MenuBar and the Tools.
The problem is that while LiveCode and following is object-based it is not object-oriented, so strict inheritance is not present, and I do not think there is a way to enforce it.
And, after a "fool about" (It being Wednesday, my non-teaching day, Hip, Hip, Hooray), I found that a field will have what it termed its 'effective backGroundColor' inherited from the stack or the card, but 'effective' is singularly ineffective as the flaming field stays white!
textColor IS inherited.
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 2910
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: OXT Lite Moving Forward
Re Buttons:
textColor and backGroundColor ARE inherited IF the buttons do NOT have 3D set to true!
However, if one really wants:
- -
Button "Cheese" has its 3D set to true!
HOWEVER ("and there's the rub"), I wonder how one can set up code to set the backGroundColor of ALL OBJECTS (present or potential) to their effective backGroundColor(s) . . .
Of course at this point one might want to go in search of a template button and a template field: alternatively one might choose to go down to the "Why Not?" and sink several jars of heavy beer.
-
textColor and backGroundColor ARE inherited IF the buttons do NOT have 3D set to true!
However, if one really wants:
- -
Button "Cheese" has its 3D set to true!
HOWEVER ("and there's the rub"), I wonder how one can set up code to set the backGroundColor of ALL OBJECTS (present or potential) to their effective backGroundColor(s) . . .
Of course at this point one might want to go in search of a template button and a template field: alternatively one might choose to go down to the "Why Not?" and sink several jars of heavy beer.
-
https://richmondmathewson.owlstown.net/
Who is online
Users browsing this forum: No registered users and 0 guests