Colourising Palettes

All flavors welcome.
Forum rules
Be kind.
User avatar
richmond62
Posts: 5288
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Colourising Palettes

Post by richmond62 »

they are quite minor and quick things to implement
I would be extremely grateful if you could explain exactly how you implemented these changes, so, should I suddenly decide, say, that I want the Properties Palette to have a tartan background (unlikely), I can effect that myself.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3522
Joined: Tue Dec 21, 2021 9:10 pm
Location: webtalk.tsites.co.uk
Contact:

Re: Colourising Palettes

Post by tperry2x »

richmond62 wrote: Tue Mar 11, 2025 8:56 am ...if you could explain exactly how you implemented these changes, so, should I suddenly decide, say, that I want the Properties Palette to have a tartan background (unlikely), I can effect that myself.
Haha, tartan is a bit harder. I've just limited myself to simple colours and styling, but I'll give you a walkthrough here in a bit... more to follow.
User avatar
tperry2x
Posts: 3522
Joined: Tue Dec 21, 2021 9:10 pm
Location: webtalk.tsites.co.uk
Contact:

Re: Colourising Palettes

Post by tperry2x »

So here's a walkthrough of how you add any setting to the preferences.

Because the preferences file is actually a livecode stack (in version 7 format), it's as simple as setting custom properties.

We can use:

Code: Select all

set the cLabelBorder of stack "revPreferences" to true
as you'd expect, the revPreferences stack now has a custom property called:

Code: Select all

cLabelBorder
which is set to true.

Simple enough so far.
So then comes the harder part. We need to track down in the IDE whereabouts to put in our check for this preference setting.

Bear in mind, everyone's preferences will have the cLabelBorder set to empty / false - so we need to put a check for this:

Code: Select all

if the cLabelBorder of stack "revPreferences" is true then
   -- do something if true
else
   -- do nothing, this is the default
end if
In this case, lets say we want to add a check for labels in the inspector:
We find where it's about to be rendered (in this case, line 133 in stack "revInspectorGroupBehavior.livecodescript").
We can add it in the:

Code: Select all

setprop rowLabel pLabel
handler. After the line:

Code: Select all

   if sShowLabel is true then
This is where we can put our conditional if else:

Code: Select all

  if the cLabelBorder of stack "revPreferences" is true then
         -- do something if true
         set the showborder of field "rowlabel" of me to true
      else
         -- do nothing, this is the default
         set the showborder of field "rowlabel" of me to false
      end if
Now, this won't actually do anything yet, because we haven't set the property at this point.

We can test it though in the message box:

Code: Select all

set the cLabelBorder of stack "revPreferences" to true
This saves it to the preferences.

Now hide and show the inspector. You should have borders around your fields on the inspector:
2025-03-11-19-57-57.png
2025-03-11-19-57-57.png (9.99 KiB) Viewed 8734 times

Now you need a corresponding button in your preferences stack:

Code: Select all

if the hilite of me is true then
   set the hilite of me to false
   set the cLabelBorder of stack "revPreferences" to false
else
   set the hilite of me to true
   set the cLabelBorder of stack "revPreferences" to true
end if
(turn off auto-hilite) on the checkbox.
So now when that button is clicked, it toggles the borders around the label fields on the inspector. However, we aren't done - the preferences card needs to change the button hilite accordingly when that page of the preferences stack is opened. We need this in the script of the preferences card:

Code: Select all

on opencard 
   -- do other stuff
      if the cLabelBorder of stack "revPreferences" is true then
      set the hilite of button "bordered labels" to true
   else
      set the hilite of button "bordered labels" to false
   end if
end opencard
User avatar
richmond62
Posts: 5288
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Colourising Palettes

Post by richmond62 »

AND, please can there be an option for these labels like the other ones?
-
Screenshot 2025-03-30 at 18.33.01.png
Screenshot 2025-03-30 at 18.33.01.png (151.69 KiB) Viewed 7183 times
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3522
Joined: Tue Dec 21, 2021 9:10 pm
Location: webtalk.tsites.co.uk
Contact:

Re: Colourising Palettes

Post by tperry2x »

inspector-tweaks.oxtstack
(2.56 KiB) Downloaded 136 times
Here's the stack (& script) to turn the bold on or off for inspector elements. Try adding them to the preferences using the method I showed above.
User avatar
richmond62
Posts: 5288
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Colourising Palettes

Post by richmond62 »

That's all very fine: but for my school setup I shall be directly downloading one of 2 possible Linux versions (tIDE or OXT Lite) directly from the storage place.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3522
Joined: Tue Dec 21, 2021 9:10 pm
Location: webtalk.tsites.co.uk
Contact:

Re: Colourising Palettes

Post by tperry2x »

richmond62 wrote: Sun Mar 30, 2025 5:03 pm That's all very fine: but for my school setup I shall be directly downloading one of 2 possible Linux versions (tIDE or OXT Lite) directly from the storage place.
That's great, however - and I haven't asked yet - what's your reasoning for having these options as bold?
I ask as the inspector isn't built to take it without some strange side-effects:
Screenshot at 2025-03-30 19-36-11.png
Screenshot at 2025-03-30 19-36-11.png (153.94 KiB) Viewed 7093 times
User avatar
richmond62
Posts: 5288
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Colourising Palettes

Post by richmond62 »

1. Because children in the past, re LCC 960, have complained that the labels in the Properties palettes are hard to see.

2. It seems that having those labels in-sync with the other ones might be a good thing aesthetically.
strange side-effects
Not that strange: just the labels need to resize to accommodate the resized text.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3522
Joined: Tue Dec 21, 2021 9:10 pm
Location: webtalk.tsites.co.uk
Contact:

Re: Colourising Palettes

Post by tperry2x »

Rather than attempting to delve into the entire palette system and width calculation for how these buttons are generated, could they not just change their screen resolution or default font size?

screenres.png
screenres.png (106.09 KiB) Viewed 7077 times
XFCE-font-size.png
XFCE-font-size.png (32.67 KiB) Viewed 7085 times
User avatar
richmond62
Posts: 5288
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Colourising Palettes

Post by richmond62 »

I could: but then to explain that to "tinies" so they can get things looking the same at home on Windows, Mac, or Linux could get a bit awkward.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3522
Joined: Tue Dec 21, 2021 9:10 pm
Location: webtalk.tsites.co.uk
Contact:

Re: Colourising Palettes

Post by tperry2x »

richmond62 wrote: Sun Mar 30, 2025 7:02 pm I could: but then to explain that to "tinies" so they can get things looking the same at home on Windows, Mac, or Linux could get a bit awkward.
Things don't look the same on Linux, Windows, or MacOS though.
(Which is of course the exact use-case and why I bothered to make those live boot images).
User avatar
richmond62
Posts: 5288
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Colourising Palettes

Post by richmond62 »

NO, they don't: but they can look similar.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3522
Joined: Tue Dec 21, 2021 9:10 pm
Location: webtalk.tsites.co.uk
Contact:

Re: Colourising Palettes

Post by tperry2x »

richmond62 wrote: Sun Mar 30, 2025 7:14 pm NO, they don't: but they can look similar.
Well, yes - they can of course be made to look similar: but they aren't similar underneath it all.
2025-03-30-20-25-03.gif
2025-03-30-20-25-03.gif (106.72 KiB) Viewed 7065 times
I don't see why that's an issue anyway: it should be pointed out that there are variations due to the computer they are using. Rather than trying to avoid the issue, should that not be mentioned from the outset? The first time they come up against a problem, is the reaction to panic, or to instead think about why something might not be as they'd expect?

After all, the rest of the OS looks different on your school computers compared to what they have at home, so why worry?
User avatar
richmond62
Posts: 5288
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Colourising Palettes

Post by richmond62 »

It is "an issue" for 9,10,11 year olds in my experience for several reasons:

1. They all have ADS from endlessly doom-scrolling on their mobile phones . . .

so explaining anything beyond the bare bones of the core programming concepts floats right over their heads . . .

2. Two years ago I had a fairly pea-brained parent (who works in "IT" - whatever that really means: probably fills in Excel spreadsheets all day) who couldn't understand why LCC 963 looked slightly different to how it had looked on the machines (running Xubuntu) in my school: and he was sure that meant it wouldn't work!

3. Several parents who "work in 'IT'" have seen their children working on my machines (at EFL stuff) and when I have explained they are running Linux have asked, "Which version of Windows are they using?"

4. . . . pea-brained proles . . .
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 5288
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Colourising Palettes

Post by richmond62 »

I have NO idea at all what Primary age children are like in other countries, but here in Bulgaria they expect to be spoon-fed, and getting them to actually do some thinking (especially anything vaguely logical) is an uphill struggle.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3522
Joined: Tue Dec 21, 2021 9:10 pm
Location: webtalk.tsites.co.uk
Contact:

Re: Colourising Palettes

Post by tperry2x »

richmond62 wrote: Mon Mar 31, 2025 6:23 pm Several parents who "work in 'IT'" have seen their children working on my machines (at EFL stuff) and when I have explained they are running Linux have asked, "Which version of Windows are they using?"
:lol:
Oh dear, what chance have the kids got? - If they can't think outside of the [windows] box, then why not run the thing in Wine?
in-wine.png
in-wine.png (195.79 KiB) Viewed 6307 times
User avatar
richmond62
Posts: 5288
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Colourising Palettes

Post by richmond62 »

Two reasons really:

1. I run Linux, rather than pay money for a system that I am always going to spend x hours a week maintaining.

2. No alcohol is allowed in schools. :D
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3522
Joined: Tue Dec 21, 2021 9:10 pm
Location: webtalk.tsites.co.uk
Contact:

Re: Colourising Palettes

Post by tperry2x »

richmond62 wrote: Mon Mar 31, 2025 7:46 pm Two reasons really:
1. I run Linux, rather than pay money for a system that I am always going to spend x hours a week maintaining.
Yes, but you are running Linux as a system with the wine method I showed above. You don't have all the Microsoft telemetry and usage reporting going on, and you also don't have to trust your computer to a very-picky-to-install distro like ReactOS, the origins of which were in Russia until recently.

So no maintaining necessary.

Mentioning ReactOS, just seen their github page comment - but I'll carry on this post on the relevant one.
richmond62 wrote: Mon Mar 31, 2025 7:46 pm 2. No alcohol is allowed in schools. :D
I must remember that one. :lol:
Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests