Standard-Toolkit icon indicating copy to clipboard operation
Standard-Toolkit copied to clipboard

[Bug]: Palette color issues in v90.24.1.22

Open tobitege opened this issue 1 year ago • 13 comments

For Krypton Toolkit v90.24.1.22-beta (via NuGet)

Issue

Some builtin themes use fore-/background color combinations which make the elements' text either invisible or unreadable.

To Reproduce

Using an app with Krypton ribbons (tabs and groups). A KryptonPage on a KryptonWorkspaceCell. In it a KryptonPanel with a KryptonTreeView, a KryptonNumericUpDown, as example.

Theme Microsoft365SilverDarkMode

Ribbon Tab normal titles appear as "white on white", i.e. unreadable, unless selected/tracked.
A single KryptonPage in a KryptonWorkSpaceCell with "NavigatorMode" being "Bar - CheckButton - Group - Outside", the tab title appears as black on (very) dark gray, becoming unreadable.

Theme Microsoft365BlackDarkMode

Input controls, like a KryptonNumericUpDown have as input area background black as color, just like KryptonPanels. Not sure if this is the desired effect, but a (very) dark gray - anything noticable above black - would serve the identifiability of the controls much better as they now appear like "labels" at first glance.

Themes Microsoft365SilverDarkMode, Microsoft365BlueDarkMode

Ribbon group "sub titles" become invisible.
A selected node within the treeview becomes unreadable as the text is way too close to the background color (no contrast).

Expected behavior

Text of all elements should be clearly readable (visible) and not "melt" into the background.

Desktop:

  • OS: Windows 11 Pro
  • Version: 23H2, Build 22631.3085
  • Framework/.NET Version: 4.8.1
  • Toolkit Version: 90.24.1.22-beta (via NuGet)
  • Visual Studio 2019, v16.11.33

tobitege avatar Jan 28 '24 09:01 tobitege

Most of this is covered by:

  • https://github.com/Krypton-Suite/Standard-Toolkit/issues/883
  • https://github.com/Krypton-Suite/Standard-Toolkit/issues/876
  • https://github.com/Krypton-Suite/Standard-Toolkit/issues/619

@tobitege Can you add specific themes with pictures please ?

Smurf-IV avatar Jan 28 '24 09:01 Smurf-IV

Microsoft365BlueDarkMode

see the KryptonPage tab (or whatever it is called), darker blue on dark blue gradient. Should be e.g. white font color (the below screenshot appears zoomed in, it is clearer to read than live on a 4K screen). grafik

Microsoft365SilverDarkMode

Same as above, but also the ribbon tabs are completely invisible now (white on white): grafik Tree node selected, unreadable grafik

Microsoft365BlackDarkMode

Black background inside user input areas like numupdown component. Might be personal preference, but background should be a smidge brighter than that: grafik

A selected tab becomes very hard to read as well: grafik

The screenshots appear scaled up in here, but readability is not the same when viewed on a 4K screen, when it becomes way smaller.

tobitege avatar Jan 28 '24 10:01 tobitege

Black background inside user input areas like numupdown component.

Input areas do share common colours now (from Office 2021)

image

The normal black theme will retain a white background

PWagner1 avatar Jan 28 '24 10:01 PWagner1

@Smurf-IV & @tobitege

There does seem to be a white band now where tabs are. If this is solved, then it may fix several bugs.

image

image

Yet it's ok for 2007 themes?????

image

PWagner1 avatar Jan 28 '24 10:01 PWagner1

at runtime I use this to fix the white on white in the SilverDark theme: myPalette.Ribbon.RibbonTab.StateNormal.TextColor = Color.Black; either the theme has it as White or even empty?

tobitege avatar Jan 28 '24 10:01 tobitege

at runtime I use this to fix the white on white in the SilverDark theme: myPalette.Ribbon.RibbonTab.StateNormal.TextColor = Color.Black; either the theme has it as White or even empty?

The white band will need to be fixed/removed as I think it's a old Aero/DWM thing. If you look at the O2k7 counterparts, they all work as expected.

PWagner1 avatar Jan 28 '24 10:01 PWagner1

Regarding the "Microsoft 365 - Black" theme

the KryptonTreeView shows nodes with white on white text as in below image (tested in Canary and Alpha):

grafik

tobitege avatar Feb 02 '24 10:02 tobitege

Regarding the "Microsoft 365 - Black" theme

the KryptonTreeView shows nodes with white on white text as in below image (tested in Canary and Alpha):

grafik

@tobitege This uses TextLabelContrl, but no idea where it's assigned to?

PWagner1 avatar Feb 02 '24 16:02 PWagner1

@tobitege This uses TextLabelContrl, but no idea where it's assigned to?

I don't know the source that well, debugging a node drawing almost makes my brain melt. :D

Eventually it seems to end up here:
grafik

This call stack is something else.... :P
grafik

Hopefully that helps

tobitege avatar Feb 02 '24 18:02 tobitege

I think the bug is in the PaletteMicrosoft365Black.cs file, where in line 144 the TextLabelControl color was set to White. In my screenshot I commented out that line activated the "old" colors, rebuilt the toolkit and tested again and the font color is readable again.
However, I haven't checked if that change would be bad for any other components.

grafik

This is how it looks in my test app now:
grafik

tobitege avatar Feb 02 '24 19:02 tobitege

@tobitege This uses TextLabelContrl, but no idea where it's assigned to?

I don't know the source that well, debugging a node drawing almost makes my brain melt. :D

Eventually it seems to end up here: grafik

This call stack is something else.... :P grafik

Hopefully that helps

@tobitege Thanks for your help, it does assist, as I can now assign it to another colour :)

PWagner1 avatar Feb 03 '24 07:02 PWagner1

In alpha branch currently, the Testform application in the standard toolkit, the MS 365 black and Office 2010 Black themes show white-on-white text in some areas (also in Treeview): grafik

grafik

tobitege avatar Feb 07 '24 17:02 tobitege

In alpha branch currently, the Testform application in the standard toolkit, the MS 365 black and Office 2010 Black themes show white-on-white text in some areas (also in Treeview): grafik

grafik

@tobitege This will be fixed in next weeks build. I've already identified the bug location.

PWagner1 avatar Feb 07 '24 17:02 PWagner1

Hi @Wagnerp & @tobitege,

Has this been resolved so far ?

giduac avatar Jun 18 '24 04:06 giduac

Hello, I hope to get to test this this evening today (GMT+2). 🍰

tobitege avatar Jun 18 '24 04:06 tobitege

Hi @giduac & @tobitege

It should be...

PWagner1 avatar Jun 18 '24 06:06 PWagner1

@Wagnerp We'll give him a day or two...for feedback... ;)

giduac avatar Jun 18 '24 06:06 giduac

Closing this for now. I have to rework my app a bit more to get up-to-date with the changes since last time. IF I'd find anything, I'd keep you posted, but till then: Thanks a LOT for your work, guys! 🥇

tobitege avatar Jun 19 '24 10:06 tobitege