Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Input controls' EditArea focus colouring is not themed #1826

Open
lesandrog opened this issue Oct 22, 2024 · 21 comments
Open

[Bug]: Input controls' EditArea focus colouring is not themed #1826

lesandrog opened this issue Oct 22, 2024 · 21 comments
Labels
area:themes All things to do with themes. area:toolkit All issues related to the toolkit components. bug Something isn't working has workaround Issues that will be fixed, but has a workaround. regression Something was working in a previous release, but isn't working now. suggestion A suggestion has been requested. version:95 All things to do with V95. version:100 All things to do with V100.
Milestone

Comments

@lesandrog
Copy link

lesandrog commented Oct 22, 2024

The Krypton ComboBox component with the DropDownStyle property = ComboBoxStyle.DropDownList, when clicked or given focus, does not display any visual selection feature.

I think this makes it difficult to navigate using keys (TAB).

The default Windowsform combobox and the ComponentFactory have different behavior.

This is a sample of the behaviour that needs correcting.
image

Controls affected:

  • KComboBox
  • KRibbonComboBox (needs a check)
  • KDateTimePicker
  • KDomainUpDown
  • KListView (all view modes affected)
  • KMaskedTextBox
  • KNumericUpdown
  • KTextBox

Other controls that are derived from the above might override behaviour and need to have a check when the above have been corrected.

Sample project:
WindowsApp3.zip

@lesandrog lesandrog added enhancement New feature or request new feature A new feature has been requested. suggestion A suggestion has been requested. labels Oct 22, 2024
@PWagner1 PWagner1 added area:toolkit All issues related to the toolkit components. version:100 All things to do with V100. labels Oct 23, 2024
@PWagner1 PWagner1 added this to the Version 100 milestone Oct 23, 2024
@giduac
Copy link
Contributor

giduac commented Nov 18, 2024

Hi @lesandrog, @PWagner1, @Smurf-IV,

I've been looking into this but the default behaviour is overridden by the theming. When the combobox has the focus and you cycle through the items by keyboard you can see the inner combobox displaying this blue/white colouring. Right after that the theming kicks in and repaints it. When hovering over it with the mouse and scrolling it this flickering isn't there.

The question here if this is something we want to change or the newer way this functions is the way to go?

Your input please...

@giduac giduac added the awaiting feedback A fix for this issue has been implemented, waiting for feedback on the fix. label Nov 18, 2024
@Smurf-IV
Copy link
Member

The ComboBox has a Theming Focus style, so things like the border colour can be changed ( thickness / rounding etc)
As for making the edit section have a colour change (I though that was also in the themeing focus section ?)
Anyway, this is obviously a regression as shown by the OP.

@Smurf-IV Smurf-IV added regression Something was working in a previous release, but isn't working now. version:85-lts All things to do with V85 LTS. version:95 All things to do with V95. and removed enhancement New feature or request new feature A new feature has been requested. labels Nov 18, 2024
@Smurf-IV Smurf-IV changed the title [Feature Request]: Focus ComboBox, ComboBoxStyle.DropDownList [Bug]: Focus ComboBox, ComboBoxStyle.DropDownList, no longer shows EditArea focus colouring Nov 18, 2024
@Smurf-IV Smurf-IV added the bug Something isn't working label Nov 18, 2024
@giduac
Copy link
Contributor

giduac commented Nov 18, 2024

@Smurf-IV
What is the Theming focus section and where to find it?

@Smurf-IV
Copy link
Member

image

I think the theme should have a value for this set.

@Smurf-IV Smurf-IV added area:themes All things to do with themes. and removed awaiting feedback A fix for this issue has been implemented, waiting for feedback on the fix. labels Nov 18, 2024
@Smurf-IV
Copy link
Member

Added themes, as V90 was supposed to be themed fixed !
Removed V85 as there is a workaround

@Smurf-IV Smurf-IV added has workaround Issues that will be fixed, but has a workaround. and removed version:85-lts All things to do with V85 LTS. labels Nov 18, 2024
@Smurf-IV Smurf-IV modified the milestones: Version 85 (LTS), Version 95 Nov 18, 2024
@giduac
Copy link
Contributor

giduac commented Nov 18, 2024

@Smurf-IV
I actually tried StateActive, but it stays active all the time not only when the control has focus / the cursor is in the edit area.

Back to the default from the inner combo isn't really an option since that won't always have the look you want with each theme on it's own.

@Smurf-IV
Copy link
Member

@Smurf-IV I actually tried StateActive, but it stays active all the time not only when the control has focus / the cursor is in the edit area.

You have to ensure that the following is set to false:
image

@Smurf-IV
Copy link
Member

Back to the default from the inner combo isn't really an option since that won't always have the look you want with each theme on it's own.

I do not understand ?

@giduac
Copy link
Contributor

giduac commented Nov 18, 2024

@Smurf-IV
Yes, that works.
But that would make it an option the user can configure...imo...?
At least the themes don't configure it and as it looks like those use/inherit the colors the StateCommon/Normal is using??

@giduac
Copy link
Contributor

giduac commented Nov 18, 2024

@lesandrog

Can you have look at the above and give it a try to configure this manually.
Please let us know what you think of it...

@giduac giduac added the awaiting feedback A fix for this issue has been implemented, waiting for feedback on the fix. label Nov 18, 2024
@lesandrog
Copy link
Author

@giduac

For now I'll use it this way, Color of StateActive/ComboBox/Back: 0;120;215 and AlwaysActive: False.

The downsides are:
When you hover over the combobox, the color changes, even before you click.
If you use a theme control, when you change to a dark theme, this component will remain blue.
And you need to manually configure all the comboboxes.

I don't think this is the most appropriate or practical solution.
I hope friends can develop something more practical.

Thank you, and congratulations on your work.

@giduac
Copy link
Contributor

giduac commented Nov 18, 2024

The downsides are:
When you hover over the combobox, the color changes, even before you click.
If you use a theme control, when you change to a dark theme, this component will remain blue.
And you need to manually configure all the comboboxes.

Hi @lesandrog,
cc.: @Smurf-IV, @PWagner1

Yes, it will do as a work-around for now.

On the other hand the questions remains if it should be part of the theming and made an options that can toggled.

I think we need a bit of discussion before we move on...

@Smurf-IV
Copy link
Member

On the other hand the questions remains if it should be part of the theming and made an options that can toggled.

It should be a theme thing, and the default should be made AllwaysActive = False (Breaking Changes!)
Not sure about toggling, as that is what the ability to override StateActive is all about.

OR:
Investigate why the focus colour (Which will not change with the theme!) is not used any more ! (But then that goes against using a theme for focus etc!)

@giduac
Copy link
Contributor

giduac commented Nov 19, 2024

On the other hand the questions remains if it should be part of the theming and made an options that can toggled.

It should be a theme thing, and the default should be made AllwaysActive = False (Breaking Changes!) Not sure about toggling, as that is what the ability to override StateActive is all about.

OR: Investigate why the focus colour (Which will not change with the theme!) is not used any more ! (But then that goes against using a theme for focus etc!)

@Smurf-IV
cc: @lesandrog (if you have ideas/thoughts don't hesitate ... )

Yes, AlwaysActive can be or rather is already the toggle for this.
The focus fore- and background colour should be defined by or derived from the theme.

Is this one that should go into the KCustomePaletteBase only as we are switching to embedded XML themes in V100.... ?
Should it, for that reason, be kept out of V95. This was the first ticket on this and that'll save us a lot of work on V95....?

@lesandrog
Copy link
Author

I've been looking at textboxes, comboboxes (dropdowns) and other components and the text selection is always blue, no matter the theme.

This focus color seems to be stuck.

In my opinion, it could be stuck, unless in the future it will be possible to customize the focus color on all components.
image

@giduac
Copy link
Contributor

giduac commented Nov 19, 2024

@lesandrog

Could you have a look at DomainUpDown and NumericUpdown ?

@lesandrog
Copy link
Author

@giduac
For these components, the text selection is also blue.

image

So this concern could be eliminated:

If you use a theme control, when you change to a dark theme, this component will remain blue.

@Smurf-IV
Copy link
Member

If you use a theme control, when you change to a dark theme, this component will remain blue.

I think that colour comes from the current active Windows Theme.

@Smurf-IV
Copy link
Member

Is this one that should go into the KCustomePaletteBase only as we are switching to embedded XML themes in V100.... ?
Should it, for that reason, be kept out of V95. This was the first ticket on this and that'll save us a lot of work on V95....?

No, AS this is a regression away from what used to happen (i.e. no highlighting at all in V85 onwards !)
So, it will Need to go into V95 as V90 was supposed to be the fixing of all things "themey" (Is that a word.. It is now :-))

@giduac
Copy link
Contributor

giduac commented Nov 20, 2024

@Smurf-IV & @PWagner1 & @lesandrog,

All input controls affected by this should get the fix and made to behave and be configurable in the same manner.

No, AS this is a regression away from what used to happen (i.e. no highlighting at all in V85 onwards !)
So, it will Need to go into V95 as V90 was supposed to be the fixing of all things "themey" (Is that a word.. It is now :-))

I think we should reconsider this as V100 only as this is not a critical issue and time is something rare in these pastures....

@giduac
Copy link
Contributor

giduac commented Nov 21, 2024

Hi @Smurf-IV, @PWagner1 & @lesandrog,

I've updated the topic start and added a list with all controls affected.

@giduac giduac changed the title [Bug]: Focus ComboBox, ComboBoxStyle.DropDownList, no longer shows EditArea focus colouring [Bug]: Input controls' EditArea focus colouring is not themed Nov 21, 2024
@Smurf-IV Smurf-IV removed the awaiting feedback A fix for this issue has been implemented, waiting for feedback on the fix. label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:themes All things to do with themes. area:toolkit All issues related to the toolkit components. bug Something isn't working has workaround Issues that will be fixed, but has a workaround. regression Something was working in a previous release, but isn't working now. suggestion A suggestion has been requested. version:95 All things to do with V95. version:100 All things to do with V100.
Projects
None yet
Development

No branches or pull requests

4 participants