bgrabitmap / bgracontrols

🆗 BGRA Controls is a set of graphical UI elements that you can use with Lazarus LCL applications.
https://bgrabitmap.github.io/bgracontrols/
182 stars 30 forks source link

TBCPanel always disable ParentBackground #154

Closed cbeier-studio closed 11 months ago

cbeier-studio commented 11 months ago

When reopening a form that has TBCPanel, it always sets its ParentBackground to False. It is not an issue most of the time.

But when the TBCPanel is a child of another TBCPanel, BorderBCStyle is bpsBorder, and Rounding is used (RoundX, RoundY greater than 1), then it gets the background color of the parent TBCPanel's parent and paints it in the corners. Setting the ParentBackground to True, solves the issue. But when the form is reopened it sets back to False, and it gets a bit annoying when using various TBCPanel in various forms.

I am using Lazarus 3.0RC1, FPC 3.2.2 on Windows 11. BGRAControls package version is 7.7.

Captura de tela 2023-10-13 105456

lainz commented 11 months ago

Hi. I understand. I will try to fix it

lainz commented 11 months ago

Hi sorry I can't fix it. I'm not sure who added that code but only works in trunk apparently... I have only current release. The code is grayed on my editor.

@maxm74 @circular17 maybe one of the two has an idea about it? I'm lost.

circular17 commented 11 months ago

Hi!

I am not sure what happens or what "form is reopened" means. Is it that when the form is created, it has the wanted behavior and when it is hidden and shown again, this changes? I suppose that ParentBackground = False means that the component is opaque and so the background color is from the Color property. One way could be to set this color to be the wanted one.

Regards

lainz commented 11 months ago

Hi. Thanks for your response.

About setting the color. We should publish the Color property?

lainz commented 11 months ago

Hi, I've added Color property. That solves the issue.

Captura de pantalla 2023-10-14 062801

cbeier-studio commented 11 months ago

Hi, thank you for the answers!

Hi, I've added Color property. That solves the issue.

Nice! It solves my issue. Thanks!