Unexpected issue with disabled graphics style
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Unexpected issue with disabled graphics style
Hi all,
I've encountered an issue with a graphics object i can't seem to find a way to resolve...
I've used a roundedRect graphic to create a set of 'buttons' embedded in a group. All works perfectly, and i've added mouseover, pressed and selected states that were exactly what i was after.
However when i set these to 'disabled', i get a wholly weird text effect - the text in the 'name' of the graphic drops a shadow in black and looks both appallingly awful and completely out of keeping with a 'disabled' state.
The graphic below shows a zoomed image of an 'enabled' and 'disabled' graphic button:
I can't see any way to modify the graphic styles for a disabled state - am i missing something?
(i guess i could code this to simulate a 'disabled' behaviour and state, but wanted to make sure i wasn't missing a native way to do this, as i'm, well, lazy )
I've encountered an issue with a graphics object i can't seem to find a way to resolve...
I've used a roundedRect graphic to create a set of 'buttons' embedded in a group. All works perfectly, and i've added mouseover, pressed and selected states that were exactly what i was after.
However when i set these to 'disabled', i get a wholly weird text effect - the text in the 'name' of the graphic drops a shadow in black and looks both appallingly awful and completely out of keeping with a 'disabled' state.
The graphic below shows a zoomed image of an 'enabled' and 'disabled' graphic button:
I can't see any way to modify the graphic styles for a disabled state - am i missing something?
(i guess i could code this to simulate a 'disabled' behaviour and state, but wanted to make sure i wasn't missing a native way to do this, as i'm, well, lazy )
-
- VIP Livecode Opensource Backer
- Posts: 129
- Joined: Sun Feb 20, 2011 4:26 pm
- Location: Vancouver Island, BC, Canada. ex.UK
- Contact:
Re: Unexpected issue with disabled graphics style
I'm seeing this effect all the way back to LiveCode 5.5.5, so I'm guessing there is a reason for it, but I'm not too sure what that is!
In earlier versions of LC, the text is greyed out when the graphic is disabled, so I can only guess that the shadow effect was to keep the text readable at small sizes, however, in LC9.6.1 the text seems to turn black regardless of the foreGround colour setting.
I also compared the properties of the graphic in both it's normal and disabled state to see if you could just reset one of them, but no dice.
I'd be interested to see if anybody else has any ideas, but my only suggestion for now would be to have a separate text label for each button. That could get a bit laborious if you have lots of buttons though.
Paul
In earlier versions of LC, the text is greyed out when the graphic is disabled, so I can only guess that the shadow effect was to keep the text readable at small sizes, however, in LC9.6.1 the text seems to turn black regardless of the foreGround colour setting.
I also compared the properties of the graphic in both it's normal and disabled state to see if you could just reset one of them, but no dice.
I'd be interested to see if anybody else has any ideas, but my only suggestion for now would be to have a separate text label for each button. That could get a bit laborious if you have lots of buttons though.
Paul
Re: Unexpected issue with disabled graphics style
Nah, in spirit of my laziness i went another way. Basically i'm using graphics as kind of button class, so the work is do once, copy/paste everywhere without having to create and keep track of extra labels or other controls. And also because i'd like the text and the outline of the button to turn a light grey to indicate it's disabled and inhibit actions (like mouseovers, clicks etc).
In essence my method is based on 3 components:
- A Custom property 'disabledFlag' for each item to enable/disable. This is used as a conditional in any relevant action (true = item disabled)
- A Stack script that handles colouring and setting the disabledFlag property (takes the long ID and enable/disable status as parameters)
- Where there are groups of controls that enable/disable together, a card script calls the stack script for each of these
Works well - but would have been nice not to have spent the time devising this...
Re: Unexpected issue with disabled graphics style
Hi guys,
confirmed in LC 9.6 on my Mac, I consider this a bug, please report it here and refer to this thread: https://quality.livecode.com
Thank you!
Best
Klaus
confirmed in LC 9.6 on my Mac, I consider this a bug, please report it here and refer to this thread: https://quality.livecode.com
Thank you!
Best
Klaus
-
- Livecode Opensource Backer
- Posts: 9446
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Unexpected issue with disabled graphics style
Over 'here' on my MacOS 10.15.6 thing I get a slightly different effect:
- -
The outer line of the disabled regular polygon is grey, but I also get the "schizoid" text effect.
Surely . . .
1. That greyed outline is insufficient to signal to an end-user that that is disabled?
2. The text should be a paler version of the enabled version?
[Of course this is NOT helped by the fact that one can apparently not change the textColor of the text in a graphic.]
If one types this into the messageBox:
the borderColor of the graphic is set as well as the text . . .
Enhancement request: https://quality.livecode.com/show_bug.cgi?id=22862
- -
The outer line of the disabled regular polygon is grey, but I also get the "schizoid" text effect.
Surely . . .
1. That greyed outline is insufficient to signal to an end-user that that is disabled?
2. The text should be a paler version of the enabled version?
[Of course this is NOT helped by the fact that one can apparently not change the textColor of the text in a graphic.]
If one types this into the messageBox:
Code: Select all
set the textColor of grc "Octagon" to red
Enhancement request: https://quality.livecode.com/show_bug.cgi?id=22862
Re: Unexpected issue with disabled graphics style
Someone tested this with LC 9.6.1 RC1 or RC2?
Is this still the case there?
Is this still the case there?
-
- Livecode Opensource Backer
- Posts: 9446
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Unexpected issue with disabled graphics style
Just the same with 9.6.1 RC 1: downloading RC 2 as I type.
- -
There is nothing in the release documentation about any changes in this area.
Humpf: just wasted 2 minutes opening that in RC 2, and that effect where a graphic with
the borderColor set to something seems totally counter to what one should expect of a
disabled control.
As the LiveCode team are focussing solely on getting the stuff onto handhelds
I wonder why we should be so naive to think that they would bother at all
about such 'minor' cosmetic blips like this.
After all, what's wrong with pushing one's product forwards endlessly without
bothering to fix a long trail of bugs and so on behind you?
- -
There is nothing in the release documentation about any changes in this area.
Humpf: just wasted 2 minutes opening that in RC 2, and that effect where a graphic with
the borderColor set to something seems totally counter to what one should expect of a
disabled control.
As the LiveCode team are focussing solely on getting the stuff onto handhelds
I wonder why we should be so naive to think that they would bother at all
about such 'minor' cosmetic blips like this.
After all, what's wrong with pushing one's product forwards endlessly without
bothering to fix a long trail of bugs and so on behind you?
Re: Unexpected issue with disabled graphics style
Hi Richmond,
no need for you to be so naive, I (and other users hopefully) will carry on postings bugs.
If we don't then there is definitively no chance of getting anything fixed, small or not!
If someone has reported this bug, please post the link to the bug#, thank you.
If not, I will do it later this evening.
Best
Klaus
no need for you to be so naive, I (and other users hopefully) will carry on postings bugs.
If we don't then there is definitively no chance of getting anything fixed, small or not!
If someone has reported this bug, please post the link to the bug#, thank you.
If not, I will do it later this evening.
Best
Klaus
-
- Livecode Opensource Backer
- Posts: 9446
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Unexpected issue with disabled graphics style
Thank you, my naive friend, but that is an enhancement request in the end and not a bug report about the topic of this thread!
Looks like Monte already suggested this last year: https://quality.livecode.com/show_bug.cgi?id=22435
Looks like Monte already suggested this last year: https://quality.livecode.com/show_bug.cgi?id=22435
-
- Livecode Opensource Backer
- Posts: 9446
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Unexpected issue with disabled graphics style
Well, when I was in the army cadets I was a first class shot with a 0.303, but everytime
I used a 0.22 I missed.
I used a 0.22 I missed.
Re: Unexpected issue with disabled graphics style
I've submitted a bug report as didn't feel other reports quite captured the issue.
https://quality.livecode.com/show_bug.cgi?id=22863
please do add a comment - a 'me too' comment would do - to increase it's visibility for the LiveCode devs.
https://quality.livecode.com/show_bug.cgi?id=22863
please do add a comment - a 'me too' comment would do - to increase it's visibility for the LiveCode devs.
Re: Unexpected issue with disabled graphics style
This is still an issue 3 years later even though my bug report was marked as CONFIRMED....
I'm encountering this again as a problem when using graphics instead of buttons to provide flexibility in layout design and with script widgets (as soon as a button is non-standard size and setting the style to 'standard' or rectangle, it draws accented bottom/right borders which is supremely annoying and archaic design pattern from 30 years ago).
A graphic would be an easier choice in that respect as you can basically change it to roundRect (with a modifiable roundRadius, which you can't do with a button), rectangle or transparent with minimal effort... but setting it to disabled has the annoyingly erroneous behaviour described above.
A further inconsistency I've noted is that the following generates an error:
whereas the following works:
this is completely inconsistent with syntax otherwise, eg buttons, and should in my view be corrected...
Bug report as previously is here: https://quality.livecode.com/show_bug.cgi?id=22863
Feel free to add a comment/cc to hopefully increase visibility...
I'm encountering this again as a problem when using graphics instead of buttons to provide flexibility in layout design and with script widgets (as soon as a button is non-standard size and setting the style to 'standard' or rectangle, it draws accented bottom/right borders which is supremely annoying and archaic design pattern from 30 years ago).
A graphic would be an easier choice in that respect as you can basically change it to roundRect (with a modifiable roundRadius, which you can't do with a button), rectangle or transparent with minimal effort... but setting it to disabled has the annoyingly erroneous behaviour described above.
A further inconsistency I've noted is that the following generates an error:
Code: Select all
If graphic <graphic> is disabled then...
Code: Select all
if the disabled of graphic <graphic> then...
Bug report as previously is here: https://quality.livecode.com/show_bug.cgi?id=22863
Feel free to add a comment/cc to hopefully increase visibility...
-
- VIP Livecode Opensource Backer
- Posts: 9852
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Unexpected issue with disabled graphics style
What prevented you from using roundRect buttons?
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
-
- Livecode Opensource Backer
- Posts: 9446
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Unexpected issue with disabled graphics style
I am NOT surprised at all.This is still an issue 3 years later
I sometimes think that those bug reports are mainly sops to keep users happy, rather than anything the developers bother to look at . . .
Personally, as most of these things are "not as they should be" I tend to use images as buttons and mess around with colorOverlay to get the effects I require:
- - -
Code: Select all
on mouseEnter
lock screen
set the coloroverlay["color"] of me to yellow
set the coloroverlay["opacity"] of me to "75"
unlock screen
-- irrelevant code removed
end mouseEnter
on mouseLeave
set the outerGlow of me to empty
set the colorOverlay of me to empty
-- irrelevant code removed
set the ink of me to srcCopy
end mouseLeave