Changing Color of Classic Objects
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Changing Color of Classic Objects
Hi all,
I'm trying to revise the highlight color of some classic objects (e.g. checkbox, tab panel) from the current blue (mac) to another colour. I've search the Livecode IDE files but can't seem to find them. I'm familiar with rolling my own controls, but would prefer to be able to make some tweaks to existing controls in some cases.
Any hints?
Thanks,
Joel
I'm trying to revise the highlight color of some classic objects (e.g. checkbox, tab panel) from the current blue (mac) to another colour. I've search the Livecode IDE files but can't seem to find them. I'm familiar with rolling my own controls, but would prefer to be able to make some tweaks to existing controls in some cases.
Any hints?
Thanks,
Joel
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Changing Color of Classic Objects
AFAIK macOS provides only two options for color treatments, gray and blue. LC uses the OS control definitions to render the objects, so limits of the OS will affect LC.
You can create custom controls if you truly need a non-standard appearance but it's a lot of work. and since users are accustomed to seeing standard controls rendered in a standard way across all app you may want to think carefully about the cost/benefit tradeoffs of changing that.
You can create custom controls if you truly need a non-standard appearance but it's a lot of work. and since users are accustomed to seeing standard controls rendered in a standard way across all app you may want to think carefully about the cost/benefit tradeoffs of changing that.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Changing Color of Classic Objects
Thanks for the quick response Richard.
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Changing Color of Classic Objects
Hi.
It shouldn't be too onerous to make your own checkboxes. Just a transparent field. a square graphic and an "X" graphic grouped together. It would actually be just a little more work for a radio buttons, since each click would have to hilite the one and unhilite the other.
Craig
It shouldn't be too onerous to make your own checkboxes. Just a transparent field. a square graphic and an "X" graphic grouped together. It would actually be just a little more work for a radio buttons, since each click would have to hilite the one and unhilite the other.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Changing Color of Classic Objects
Depends how complete you want it to be.
In addition to the "checked" and "unchecked" states, most OSes provide intermediate states as well, such as a faint border highlight or other visual reinforcement when the mouse is down on the control but before the mouse is released, and a focus border for keeping the control keyboard-navigable.
And unless you write it as a widget with LC Builder where you're using line-by-line drawing instructions, you'll probably implement those states as raster icons, so you'd need images for each of the states combined:
- checked
- unchecked
- checked, focused
- unchecked, focused
- checked, focused, mouseover
- unchecked, focused, mouseover
- checked, no focus, mouseover
- unchecked, no focus, mouseover
There might be more if I think about it a while. OS designers have been thinking about these things a very long time.
After you make all the images, you'd need to write a script to handle all the various mouse events and states to know which icon to display under which circumstance.
All doable, but tedious. And while it's a fun exercise to appreciate what the OS and LiveCode deliver to us for free, it takes time away from developing features in the critical path of the app's functionality. And in addition to that opportunity cost it adds a minor uptick in cognitive load by introducing novel appearances to users in a context where they've become accustomed to seeing standard controls everywhere else.
All that said, I don't know the specifics of your app, so I can't say whether a custom checkbox may be a good idea after all. Years ago I worked on a project for preschoolers where a custom Boolean indicator was exactly what was needed for that project.
In addition to the "checked" and "unchecked" states, most OSes provide intermediate states as well, such as a faint border highlight or other visual reinforcement when the mouse is down on the control but before the mouse is released, and a focus border for keeping the control keyboard-navigable.
And unless you write it as a widget with LC Builder where you're using line-by-line drawing instructions, you'll probably implement those states as raster icons, so you'd need images for each of the states combined:
- checked
- unchecked
- checked, focused
- unchecked, focused
- checked, focused, mouseover
- unchecked, focused, mouseover
- checked, no focus, mouseover
- unchecked, no focus, mouseover
There might be more if I think about it a while. OS designers have been thinking about these things a very long time.
After you make all the images, you'd need to write a script to handle all the various mouse events and states to know which icon to display under which circumstance.
All doable, but tedious. And while it's a fun exercise to appreciate what the OS and LiveCode deliver to us for free, it takes time away from developing features in the critical path of the app's functionality. And in addition to that opportunity cost it adds a minor uptick in cognitive load by introducing novel appearances to users in a context where they've become accustomed to seeing standard controls everywhere else.
All that said, I don't know the specifics of your app, so I can't say whether a custom checkbox may be a good idea after all. Years ago I worked on a project for preschoolers where a custom Boolean indicator was exactly what was needed for that project.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Changing Color of Classic Objects
Thanks for all the helpful replies.
I don't have any issues with writing my own controls (within the IDE, not using LCB yet). I recently did an accordion control and tri-state checkboxes (that also monitor child binary checkboxes to get and set their status).
I was hoping to save some work on some additional controls that aren't behaving as I'd like (palette actions widget) and was hoping to use the tab panel instead, but not happy with the blue highlight (on the Mac). Richard's first reply leads me to believe there is not some RGB value in some Livecode file that I can change to revise this.
Joel
I don't have any issues with writing my own controls (within the IDE, not using LCB yet). I recently did an accordion control and tri-state checkboxes (that also monitor child binary checkboxes to get and set their status).
I was hoping to save some work on some additional controls that aren't behaving as I'd like (palette actions widget) and was hoping to use the tab panel instead, but not happy with the blue highlight (on the Mac). Richard's first reply leads me to believe there is not some RGB value in some Livecode file that I can change to revise this.
Joel