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]: OverrideFocus Designer settings do not work or Prevent Ribbon MouseOver Highlighting #227

Closed
sdreb3421 opened this issue Aug 3, 2021 · 30 comments
Labels
bug Something isn't working completed This issue has been completed. enhancement New feature or request help wanted Extra attention is needed new feature A new feature has been requested. suggestion A suggestion has been requested.

Comments

@sdreb3421
Copy link

There is currently no way to prevent ribbon groups from drawing a rounded white highlight when the mouse is over. This is barely noticeable in a light theme, but looks harsh in a dark theme, and interferes with button tracking/checked colors.

ribbongrouphighlight

@sdreb3421 sdreb3421 added enhancement New feature or request new feature A new feature has been requested. suggestion A suggestion has been requested. labels Aug 3, 2021
@Wagnerp
Copy link
Contributor

Wagnerp commented Aug 3, 2021

@sdreb3421

I'll have a look at it.

@Wagnerp Wagnerp self-assigned this Aug 3, 2021
@Wagnerp Wagnerp added in progress A fix for this issue is in the works. under investigation This bug/issue is currently under investigation. labels Aug 3, 2021
@Wagnerp Wagnerp added this to the November 2021 (Version 6) milestone Aug 3, 2021
@Smurf-IV
Copy link
Member

Smurf-IV commented Aug 3, 2021

These are supposed to be overridden with the following
image

But even setting them to the orange does not work (I was expecting Transparent to solve the issue!)
The bug is in the usage of these colours (And the fact that they description to make them clear as to what they are supposed to be used for !)

@Smurf-IV
Copy link
Member

Smurf-IV commented Aug 3, 2021

So: Not an Enhancement, but a bug on OverrideFocus colour usage !

@Wagnerp
Copy link
Contributor

Wagnerp commented Aug 4, 2021

So: Not an Enhancement, but a bug on OverrideFocus colour usage !

@Smurf-IV

Maybe a new bug report? Still, I need to fix the tab background colours for dark modes

@Wagnerp
Copy link
Contributor

Wagnerp commented Aug 4, 2021

These are supposed to be overridden with the following
image

But even setting them to the orange does not work (I was expecting Transparent to solve the issue!)
The bug is in the usage of these colours (And the fact that they description to make them clear as to what they are supposed to be used for !)

@Smurf-IV

Is this the issue:

Color.Empty,                      // RibbonTabTracking3
                                                                      Color.Empty,                      // RibbonTabTracking4
                                                                      Color.Empty,                      // RibbonGroupBorder3
                                                                      Color.Empty,                      // RibbonGroupBorder4

@Smurf-IV
Copy link
Member

Smurf-IV commented Aug 4, 2021

Those are defaults,
What I am showing above is an override, that is supposed to be applied, but they are not, so empty is being used, and then that reads the theme values only.

@sdreb3421
Copy link
Author

Do you think this will make it into the next release? Anything I can do to help?

@Wagnerp Wagnerp added the help wanted Extra attention is needed label Aug 17, 2021
@Wagnerp
Copy link
Contributor

Wagnerp commented Aug 17, 2021

Found the possible colours, but are these supposed to be theme colours?

image

@Smurf-IV
Copy link
Member

Yes many colours to perform the "Rounded feel" of the track highlight,
But they are not being overridden when selected in the designer, so cannot be disabled in that way either !

@Wagnerp
Copy link
Contributor

Wagnerp commented Aug 17, 2021

Yes many colours to perform the "Rounded feel" of the track highlight,
But they are not being overridden when selected in the designer, so cannot be disabled in that way either !

Somewhere in the code, the SetStyle(ControlStyles.SupportsTransparentColor) is not being used

@Wagnerp Wagnerp removed their assignment Aug 20, 2021
@sdreb3421
Copy link
Author

I could try to investigate. Any tips for where to start?

@Wagnerp
Copy link
Contributor

Wagnerp commented Aug 22, 2021

I could try to investigate. Any tips for where to start?

The bug would likely be within the ribbon controls portion of the toolkit i.e. anything to do with the tab & palettes

@sdreb3421
Copy link
Author

I'll look into it. Do you know which of the listed colors above apply to the highlight? RibbonTabHighlight?

@Wagnerp
Copy link
Contributor

Wagnerp commented Aug 22, 2021

I'll look into it. Do you know which of the listed colors above apply to the highlight? RibbonTabHighlight?

These are taken from the O2k7 Black theme

image

image

Hope they help

@sdreb3421
Copy link
Author

I've been digging around all day without success. I assumed there would be a MouseEnter event that could be tracked from method to method until the palette colors were applied, but it's a bit more complicated than that.

@Wagnerp
Copy link
Contributor

Wagnerp commented Aug 24, 2021

I've been digging around all day without success. I assumed there would be a MouseEnter event that could be tracked from method to method until the palette colors were applied, but it's a bit more complicated than that.

Might be in the palette 'base' code

@sdreb3421
Copy link
Author

sdreb3421 commented Aug 24, 2021

Found it! There is a PathGradientBrush named highlightBrush in the RenderMementos.cs file. The comments explain it is for drawing the rounded highlight at bottom center. The colors used look to be fixed.

It is referenced in a few classes such as RenderOffice365, but the code that modifies it is grayed out.

It would be nice to set these colors, but would be fine if there was just an option to turn it off, which might be less work.

@Wagnerp
Copy link
Contributor

Wagnerp commented Aug 24, 2021

Can you give me the path? Maybe a user defined colour is needed?

@sdreb3421
Copy link
Author

Source/Krypton Components/Krypton.Toolkit/Rendering/RenderMementos.cs

@Wagnerp
Copy link
Contributor

Wagnerp commented Aug 24, 2021

I'll check it out tomorrow

@sdreb3421
Copy link
Author

Nice, let me know if I can do anything else

@Wagnerp
Copy link
Contributor

Wagnerp commented Aug 24, 2021

Do you know which lines they are?

@sdreb3421
Copy link
Author

487 in rendermementos

@Wagnerp
Copy link
Contributor

Wagnerp commented Aug 24, 2021

@Smurf-IV Might need assistance prizing this apart

@Smurf-IV
Copy link
Member

Sure.. Thanks for the research 👍
I'll have a bash this week at it

@Smurf-IV
Copy link
Member

Smurf-IV commented Aug 29, 2021

Getting there:
Showing Lime override:
ShowLimeOverride

@Smurf-IV
Copy link
Member

New Designer area
image

@Smurf-IV
Copy link
Member

The Fix works in All Themes apart from Office2k7 and Sparkle, where it is diminished but still highlights with white!

@Smurf-IV
Copy link
Member

To disable highlighting - Just change the Above designer elements to Transparent

@Smurf-IV Smurf-IV removed their assignment Aug 29, 2021
@Smurf-IV Smurf-IV added bug Something isn't working completed This issue has been completed. and removed under investigation This bug/issue is currently under investigation. in progress A fix for this issue is in the works. labels Aug 29, 2021
@Smurf-IV Smurf-IV changed the title [Feature Request]: Prevent Ribbon MouseOver Highlighting [Bug]: OverrideFocus Designer settings do not work or Prevent Ribbon MouseOver Highlighting Aug 29, 2021
@sdreb3421
Copy link
Author

Nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working completed This issue has been completed. enhancement New feature or request help wanted Extra attention is needed new feature A new feature has been requested. suggestion A suggestion has been requested.
Projects
None yet
Development

No branches or pull requests

3 participants