- This topic has 17 replies, 4 voices, and was last updated 4 years, 11 months ago by HeDiBo.
-
AuthorPosts
-
June 27, 2019 at 2:08 pm #38303HeDiBoParticipant
Suddenly, upgrading from AC 14.25 to AC 14.27, I find a focus rectangle on TsButton, that I did not see before:
[attachment=9392:FocusRect427.jpg]
It is extremely ugly. Maybe there's a setting to prevent it from being drawn, but that should be the default. I'm not going after all buttons in all my projects to change that setting.
June 27, 2019 at 2:37 pm #59685Stephane SenecalParticipantTsSkinManager.ButtonsOptions.ShowFocusRect = False
Stephane Senecal
CIS Group
Delphi programmer since 2001June 27, 2019 at 2:39 pm #59686HeDiBoParticipant'Stephane wrote:TsSkinManager.ButtonsOptions.ShowFocusRect = False
Do you really think I'll go through all my projects to make this setting?
If it worked for years without the focus rectangle, than a new version should default not having a focus rectangle.
June 27, 2019 at 2:52 pm #59687Stephane SenecalParticipantWeird, I'm using version 13 of AlphaSkins and a TsButton does not draw a focus rectangle by default, but a TsBitBtn does.
Both have the property ShowFocus to True by default. It looks like a bug that you liked.
I agree that a focus rectangle is the ugliest way to show which control has the focus, but it is the standard way on Microsoft Windows.
By the way, I do not work for Alpha Skins. I'm only trying to help.
Stephane Senecal
CIS Group
Delphi programmer since 2001June 27, 2019 at 3:45 pm #59688HeDiBoParticipant'Stephane wrote:Weird, I'm using version 13 of AlphaSkins and a TsButton does not draw a focus rectangle by default, but a TsBitBtn does.
Both have the property ShowFocus to True by default. It looks like a bug that you liked.
I agree that a focus rectangle is the ugliest way to show which control has the focus, but it is the standard way on Microsoft Windows.
By the way, I do not work for Alpha Skins. I'm only trying to help.
I know you're not working for AlphaSkins. Pardon me if I looked to be yelling at you. I was a bit fed up with the situation.
I think it stands to reason not to honor the ShowFocus property if the button is skinned (it should be honored if the skin manager is not active). The skinned versions all have their own methods of showing focus, The rectangle should not be one of them, because that makes the non-skinned versions unusable (setting FocusRect to False will also be honored in non-skinned versions).
So, this is simply a mistake.
June 28, 2019 at 12:39 pm #59690SzakiLaciParticipant'HeDiBo' wrote:Suddenly, I find a focus rectangle on TsButton, that I did not see before…
Hi, 🙂
I just would like to mention there is a nice way to show :
which TsBitBtn has the focus at NON-skinned mode, by setting the .FocusedColor := clLime; property.
It may has nothing to do with this new problem… just would like to recommend a bit precaution, because it is related to “non-skinned focus” things.
So any new update regarding this may affect that behavior too, since it is a bit hard to test each property setup in every possible variations.
(Delphi GeExpert addon has a great feature to replace all components on the form at once. TsButton >> TsBitBtn.)
Cheers
PS: could you please edit your first topic to announce which version do you experience this new behavior? (After upgrading from which?)
It will help Serge too… 😉
June 28, 2019 at 12:47 pm #59691HeDiBoParticipant'SzakiLaci' wrote:It may has nothing to do with this new problem… just would like to recommend a bit precaution, because it is related to “non-skinned focus” things.
So any new update regarding this may affect that behavior too, since it is a bit hard to test each property setup in every possible variations.
…
PS: could you please edit your first topic to announce which version do you experience this new behavior? (After upgrading from which?)
It will help Serge too… 😉
I looked at the code, and the change stems from change in code in TsButton specifically.
I updated the original topic, like you suggested.
June 29, 2019 at 5:47 am #59700SupportKeymasterI also thinking that these focuses looks not good.
I can change default value of the TsSkinManager.ButtonsOptions.ShowFocusRect property to False.
June 29, 2019 at 10:02 am #59703HeDiBoParticipant'Support' wrote:I also thinking that these focuses looks not good.
I can change default value of the TsSkinManager.ButtonsOptions.ShowFocusRect property to False.
That's not the correct way of doing it. If the property defaults to False, there's no focus rectangle in non-skinned mode. Simply do not draw a focus rectangle in skinned mode. The skin should provide a good alternative for showing the focus. If it has not, than the skin must change, not this logic.
If someone thought the focus does not show properly in skinned mode, maybe a new property ForceFocusRect should be introduced. The way it is now spoils it for everybody.
June 30, 2019 at 10:43 am #59707SupportKeymasterI think, buttons without skins should use the ShowFocus property only.
They should not depend from TsSkinManager.ButtonsOptions.ShowFocusRect property if have standard look.
How you think?
June 30, 2019 at 12:09 pm #59708HeDiBoParticipant'Support' wrote:I think, buttons without skins should use the ShowFocus property only.
They should not depend from TsSkinManager.ButtonsOptions.ShowFocusRect property if have standard look.
How you think?
I made the mistake thinking ShowFocusRect was a standard TButton property. What you're saying is correct. Default the ShowFocusRect property to False will do the trick.
June 30, 2019 at 3:56 pm #59710SzakiLaciParticipant'Support' wrote:I think, buttons without skins should use the ShowFocus property only.
They should not depend from TsSkinManager.ButtonsOptions.ShowFocusRect property if have standard look.
How you think?
Sounds like a perfect solution! :a3:
August 28, 2019 at 10:49 am #59860HeDiBoParticipantIf TsButton.ShowFocus is false, focus is still shown. In fact, I could not find any difference between ShowFocus = True and ShowFocus = False.
October 3, 2019 at 4:41 pm #61521SupportKeymasterHello!
I have checked it again right now, focus rectangle is not painted when ShowFocus property is False in my tests.
Can you confirm this issue?October 3, 2019 at 6:32 pm #61536HeDiBoParticipantHello!
I have checked it again right now, focus rectangle is not painted when ShowFocus property is False in my tests.The problem was that ShowFocus is not honored in a TsButton. There’s no difference with ShowFocus = True and ShowFocus = False, irrespective of whether skinmanager is active or not. Only if skinmanager is active and ButtonsOptions.ShowFocusRect is true, a focus rectangle is drawn.
It’s a bit of a mess, because the focus rectangle should only be drawn in non-skinned mode!October 3, 2019 at 8:45 pm #61550SupportKeymasterMaybe I can’t understand a problem.
I’m creating a new project with TsEdit and TsButton (without TsSkinManager).
When button is focused in real-time then focus rectangle is drawn.
I’m changing ShowFocus to False – focus rectangle is not visible in real-time when focused.I’m placing TsSkinManager (not active) there – same behaviour.
After a skin activating focus rectangle is not visible (ShowFocus hasn’t influence).
After changing of TsSkinManager.ButtonsOptions.ShowFocusRect to True works the ShowFocus property of the TsButton.
You have another behavior of the TsButton? Can you show an Exe-file please?
October 4, 2019 at 12:46 pm #61578HeDiBoParticipantI’m very sorry, I put you through this agony 🥴
I cannot reproduce it in a sample project. I thought I had this in another project, so I’ll retest that.December 3, 2019 at 2:27 pm #68202HeDiBoParticipantYou can close this topic, Serge.
-
AuthorPosts
- The topic ‘Ugly focus rectangle in TsButton’ is closed to new replies.