Closed lukas2-werner closed 2 months ago
Hi @lukas2-werner,
Can you please state which custom theme you are using? Can you provide a sample program that reproduces the error please?
I use this theme https://github.com/Krypton-Suite/Theme-Palettes/blob/alpha/Palettes/Other/Asphalt_v19.xml Unfortunately I cannot provide the program. The bug was introduced in this commit and as far as I can tell the InputControlStyle should not be set to PanelClient but left in its default state. If I remove that line everything works.
Hi @lukas2-werner
I understand that you cannot provide the actual program and we don't need that. But can you please provide new small sample program that reproduces the error clearly.
In that way we don't have guess or try all kind of combinations to reproduce the error.
TY.
I just tried it with a random example 'Test MessageBox Clipping 2022' from Standard-Toolkit-Demos. Change to latest nightly. Change this line to:
string themePath = @"......Asphalt_v19.xml";
KryptonCustomPaletteBase palette = new();
using (Stream stream = new FileStream(themePath, FileMode.Open))
{
palette.Import(stream);
}
kryptonManager.GlobalCustomPalette = palette;
Start the example and switch to custom theme. Pressing a button to open the MessageBox produces the error
This is triggered (possibly) by a missing case in a switch
statement. The debug tools are really helping with locating these types of bugs.
@lukas2-werner Ty.
@Wagnerp, That sounds a like a case for you ...
Hi @giduac
Building on my last response, the bug is in GetPalettePanel
in KryptonCustomPaletteBase
@lukas2-werner
Can you please provide a sample that triggers this bug all the time?
I just tried it with a random example 'Test MessageBox Clipping 2022' from Standard-Toolkit-Demos. Change to latest nightly. Change this line to:
string themePath = @"......Asphalt_v19.xml"; KryptonCustomPaletteBase palette = new(); using (Stream stream = new FileStream(themePath, FileMode.Open)) { palette.Import(stream); } kryptonManager.GlobalCustomPalette = palette;
Start the example and switch to custom theme. Pressing a button to open the MessageBox produces the error
Hi @Wagnerp I can reproduce the error with the steps above. Let me know if you need further info.
I just tried it with a random example 'Test MessageBox Clipping 2022' from Standard-Toolkit-Demos. Change to latest nightly. Change this line to:
string themePath = @"......Asphalt_v19.xml"; KryptonCustomPaletteBase palette = new(); using (Stream stream = new FileStream(themePath, FileMode.Open)) { palette.Import(stream); } kryptonManager.GlobalCustomPalette = palette;
Start the example and switch to custom theme. Pressing a button to open the MessageBox produces the error
Hi @Wagnerp I can reproduce the error with the steps above. Let me know if you need further info.
Hi @lukas2-werner
What happens if you directly feed the path into the Import()
function, i.e. Import("<#PATH-TO-FILE#>\Asphalt_v19.xml")
?
The same thing happens.
@Smurf-IV Is there a way to do a recursive upgrade of palettes, as many of them are still on v19 & the current version is 21?
cc. @giduac
@Wagnerp Which files is it about? What needs changing?
@Wagnerp Which files is it about? What needs changing?
@giduac
The custom palette XML files need updating to use the latest schema. It can be done individually using https://github.com/Krypton-Suite/Theme-Palettes/tree/master/Applications/Source/Palette%20Upgrade%20Tool, but I wonder if it can be extended to accept a folder as a input/output?
@Wagnerp Which files is it about? What needs changing?
@giduac
The custom palette XML files need updating to use the latest schema. It can be done individually using https://github.com/Krypton-Suite/Theme-Palettes/tree/master/Applications/Source/Palette%20Upgrade%20Tool, but I wonder if it can be extended to accept a folder as a input/output?
Create an item in the Themes repo backlog please?
@Wagnerp Which files is it about? What needs changing?
@giduac
The custom palette XML files need updating to use the latest schema. It can be done individually using https://github.com/Krypton-Suite/Theme-Palettes/tree/master/Applications/Source/Palette%20Upgrade%20Tool, but I wonder if it can be extended to accept a folder as a input/output?
@Wagnerp Is the version discrepancy the cause of this bug?
@Wagnerp Which files is it about? What needs changing?
@giduac The custom palette XML files need updating to use the latest schema. It can be done individually using https://github.com/Krypton-Suite/Theme-Palettes/tree/master/Applications/Source/Palette%20Upgrade%20Tool, but I wonder if it can be extended to accept a folder as a input/output?
@Wagnerp Is the version discrepancy the cause of this bug?
@giduac
Need to test, but the toolkit should prompt the user to upgrade the palette XML if it's incompatible...
@Smurf-IV & @giduac
Are you having issues doing anything in the demos?
@Smurf-IV & @giduac
Are you having issues doing anything in the demos?
Yes; that has been happening today, was not sure if it was a Weirdness with 17.11 p4 or not, because when you go and open the file, the warnings go away?!?!?!
Does not appear in VS 17.10.4 (It just complains about the use of .Net 9 SDK!)
Hi @lukas2-werner
Looks like a palette version incompatibility issue. Have you tried upgrading it?
cc. @Smurf-IV & @giduac
Yes, I used the Palette Upgrade Tool but the result is the same. I tested different alpha releases and found that this commit https://github.com/Krypton-Suite/Standard-Toolkit/commit/3d25e5ae049e15b897340ae5512772e14e30955c#diff-909c8db448444eaef31624917ade63e1ebd73f8c72998db89db7851e48443d6c is where it broke. Before that everything works.
Hi @lukas2-werner, cc: @Wagnerp
Keep an eye on discord for the notification when the next nightly will be released. Please let us know your findings.
I tested the 90.24.8.232-alpha and it works. Thank you for the fix!
Describe the bug The following message pops up if I open a KryptonMessageBox while a custom theme is loaded: looking at the stack trace: It seems it is this line that is causing the bug: https://github.com/Krypton-Suite/Standard-Toolkit/blob/cfc99500bbcd07061dc750a79651180540d72fbc/Source/Krypton%20Components/Krypton.Toolkit/Controls%20Visuals/VisualMessageBoxForm.Designer.cs#L205
Desktop (please complete the following information):