Krypton-Suite / Standard-Toolkit

An update to Component factory's krypton toolkit to support .NET Framework 4.6.2 - 4.8.1 to .NET 6 - 8
BSD 3-Clause "New" or "Revised" License
396 stars 60 forks source link

[Bug] Rounded Form borders have "Triangles" in corners #1749

Closed Smurf-IV closed 1 month ago

Smurf-IV commented 1 month ago

Originally posted by @Smurf-IV in https://github.com/Krypton-Suite/Standard-Toolkit/issues/1271#issuecomment-2304977265

Expected (V85)

image

Actual (V90 alpha):

image

Smurf-IV commented 1 month ago

It is more "Noticeable" when rounding is increased: image

Notes:

Smurf-IV commented 1 month ago

I have been chasing my tail on this: and it appears that my statement that it has been there a while is true. Because settings borders to be visible (i.e.not default) also causes the triangles and the "single pixel line" to appear in V80 as well: image

Edit: It's just not as bad as it is in V90 !!

giduac commented 1 month ago

@Smurf-IV Does it differ between themes / gets more or less worse / stays the same? Which color does Windows use for transparency?

Smurf-IV commented 1 month ago

Does it differ between themes

Yes, as some do not have the default rounding

gets more or less worse / stays the same?

In v90 2They" all have the obvious small triangle without the need to force the coloured border. Coloured borders (i.e. setting thickness and roundness to be a "Big" value" cause it to be exaggerated (As per V80 image)

Which color does Windows use for transparency?

for NC area, it is supposed to be black, and then state it is not in clipping; If within a form, then it can be set to a specific colour or via opaqueness.

giduac commented 1 month ago

This is alpha on W11

image

giduac commented 1 month ago

This is with this.TransparencyKey = Color.Black;

image

giduac commented 1 month ago

Setting the TransparencyKey to Magenta or Transparent results in the black corner again

image

Smurf-IV commented 1 month ago

This is with this.TransparencyKey = Color.Black;

Good find, That's a great ;-) But, does it mean that each Theme will have to a Transparency key, otherwise dark themes will become transparent ??

Smurf-IV commented 1 month ago

Anything that is not a Krypton object is then obliterated: image

And even some of the KButton text made wibbly-wobbly ;-(

giduac commented 1 month ago

Also has adverse effects on the Kpropgrid

image

giduac commented 1 month ago

DrawString versus DrawText ?

giduac commented 1 month ago

Maybe a different colour might work.

This is what ChatGPT coughs up on this:

image

Smurf-IV commented 1 month ago

Yay fixed. Rather simpler when the "big file" is done ! Thanks @giduac for the pointer.. Just had to put it in the correct place ;-)

image

And image

giduac commented 1 month ago

@Smurf-IV Rounding looks good now. But, forms now have a thin magenta border...

giduac commented 1 month ago

@Smurf-IV

The thin border always shows when the width is set to any value but zero.

https://github.com/user-attachments/assets/a3b2b581-e862-4a00-a23e-e0c8086129a7

Smurf-IV commented 1 month ago

@Smurf-IV

The thin border always shows when the width is set to any value but zero.

Please raise another bug ;-(