Standard-Toolkit
Standard-Toolkit copied to clipboard
[Bug]: Palette color issues in v90.24.1.22
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
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 ?
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).
Microsoft365SilverDarkMode
Same as above, but also the ribbon tabs are completely invisible now (white on white):
Tree node selected, unreadable
Microsoft365BlackDarkMode
Black background inside user input areas like numupdown component.
Might be personal preference, but background should be a smidge brighter than that:
A selected tab becomes very hard to read as well:
The screenshots appear scaled up in here, but readability is not the same when viewed on a 4K screen, when it becomes way smaller.
Black background inside user input areas like numupdown component.
Input areas do share common colours now (from Office 2021)
The normal black theme will retain a white background
@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.
Yet it's ok for 2007 themes?????
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?
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.
Regarding the "Microsoft 365 - Black" theme
the KryptonTreeView shows nodes with white on white text as in below image (tested in Canary and Alpha):
Regarding the "Microsoft 365 - Black" theme
the KryptonTreeView shows nodes with white on white text as in below image (tested in Canary and Alpha):
@tobitege This uses TextLabelContrl
, but no idea where it's assigned to?
@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:
This call stack is something else.... :P
Hopefully that helps
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.
This is how it looks in my test app now:
@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:
This call stack is something else.... :P
Hopefully that helps
@tobitege Thanks for your help, it does assist, as I can now assign it to another colour :)
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):
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):
@tobitege This will be fixed in next weeks build. I've already identified the bug location.
Hi @Wagnerp & @tobitege,
Has this been resolved so far ?
Hello, I hope to get to test this this evening today (GMT+2). 🍰
Hi @giduac & @tobitege
It should be...
@Wagnerp We'll give him a day or two...for feedback... ;)
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! 🥇