Recent

Author Topic: TBCButtonFocus: round corners leave white BG on gradient  (Read 1252 times)

winni

  • Hero Member
  • *****
  • Posts: 3197
TBCButtonFocus: round corners leave white BG on gradient
« on: September 19, 2020, 12:24:02 am »
Hi!

Situation:

A TBCButtonFocus with round corners on a Form.
If the form has one solid color everything is ok:
the cliiped rest of the rectangle is in the Form.color.

Now I wanted to put a gradient on the Form:
The corners of the round TBCButtonFocus are white.
And I don't know how to fix it.

The color of the button is clNone.
And there are no options for transperency in the class.

Does anybody how to change that?

Problem is shown in the attachment.

Winni
« Last Edit: September 19, 2020, 12:26:38 am by winni »

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: TBCButtonFocus: round corners leave white BG on gradient
« Reply #1 on: September 19, 2020, 01:56:52 am »
I suppose you're on Linux?

I already reported the bug:
https://bugs.freepascal.org/view.php?id=37005

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: TBCButtonFocus: round corners leave white BG on gradient
« Reply #2 on: September 19, 2020, 03:42:47 am »
Hi Lainz!

I see - thanx.
Yes - I am on Linux.

Wild hack-workaround:

Set the button.color to something ugly and unused (clOlive??).
Make a backup of the gradient.
Replace all corner pixels with the button.color by the related pixel of the gradient.
Don't do it on the canvas because it is awfull slow.
Copy it to an intermediate BGRAbitmap an do all needed operations there.

Another rattrap .....

Your entry in the bug tracker is from 1/5/2020.
Does anybody care about LCL graphics?

Winni

PS. That was the "International fighting day of the working class".




lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: TBCButtonFocus: round corners leave white BG on gradient
« Reply #3 on: September 19, 2020, 04:34:29 am »
Nice to know. Sometimes is a fight using the bugtracker...
Like when proposing changes or reporting strange bugs...
If not a fight at least a vivid discussion
Like in real life I think.  :)
« Last Edit: September 19, 2020, 11:08:04 am by lainz »

 

TinyPortal © 2005-2018