Recent

Author Topic: Tbcpanel background bleed with border enabled.  (Read 5882 times)

Josh

  • Hero Member
  • *****
  • Posts: 1455
Tbcpanel background bleed with border enabled.
« on: May 02, 2015, 12:48:20 am »
Hi
I have been playing with the tbcpanel, I like the rounding of corners idea as it allows for some smoothing of panels, however when I set the border and rounding, the tbcpanel background bleeds past the rounded border. It is not a major bleed.

Any ideas how to fix.

I am experimenting trying to find ways of speeding up an application that uses the LCL extensively with tbcbutton, currently all components are on a tpanel, is tbcpanel or tbgravirtualscreen a better and faster panel to use? If so is there any things to be aware of, or limitations using these over a tpanel.

pic attached
« Last Edit: May 02, 2015, 11:16:59 pm by josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

lainz

  • Hero Member
  • *****
  • Posts: 4742
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Tbcpanel background bleed with border enabled.
« Reply #1 on: May 02, 2015, 01:25:36 am »
screenshot please

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Tbcpanel background bleed with border enabled.
« Reply #2 on: May 02, 2015, 03:05:44 pm »
Hmm I tried to fix this, but maybe we are not there yet. What version of BGRABitmap and BGRAControls are you using josh?
Conscience is the debugger of the mind

Josh

  • Hero Member
  • *****
  • Posts: 1455
Re: Tbcpanel background bleed with border enabled.
« Reply #3 on: May 02, 2015, 03:24:00 pm »
Hi Circular,

Bitmap 8.3
Controls 3.5

I think they are pretty recent, as I also have been playing with FPGUI to see if there is a performance increase if using this with bgrabitmap, unfortunately not done too much testing with this as it looks as though I have to install X11 on OSX to get things working, which makes it not cross-platform transparent as I would have liked.

Thanks for your help
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Tbcpanel background bleed with border enabled.
« Reply #4 on: May 02, 2015, 07:52:19 pm »
This fixes are very recent. Please download latest version of both BGRABitmap and BGRAControls.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4742
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Tbcpanel background bleed with border enabled.
« Reply #5 on: May 02, 2015, 08:11:10 pm »
Is looking perfect on latest svn. Thanks for fixing it.

Josh

  • Hero Member
  • *****
  • Posts: 1455
Re: Tbcpanel background bleed with border enabled. (FIXED SOLVED)
« Reply #6 on: May 02, 2015, 09:30:03 pm »
Hi Circular,

Just updated to latest snapshots of both and the anomaly is indeed fixed.

Thanks for your prompt reply and recent fix.  :)
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

Josh

  • Hero Member
  • *****
  • Posts: 1455
Re: Tbcpanel background bleed with border enabled.
« Reply #7 on: May 02, 2015, 10:17:28 pm »
Hi
Just done some further testing, the latest version seem to have now had a knock on effect.
I had used TBCButton to create a nice UI, and they had a 2 or 4 pixel gap between, now after updating the gaps between the controls have reduced, and some are now overlapping.

What has changed in the latest snapshots that could cause this.

Noticeable in IDE and EXE

Problem is BGRACOntrols, if I take it back to previous version. Then everything is back to before
« Last Edit: May 02, 2015, 10:20:51 pm by josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Tbcpanel background bleed with border enabled.
« Reply #8 on: May 03, 2015, 01:57:08 am »
Can you post a screenshot?
Conscience is the debugger of the mind

Josh

  • Hero Member
  • *****
  • Posts: 1455
Re: Tbcpanel background bleed with border enabled.
« Reply #9 on: May 03, 2015, 07:49:10 am »
Hi Circular

Samples as requested, hopefully you can see the difference
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Tbcpanel background bleed with border enabled.
« Reply #10 on: May 03, 2015, 01:25:24 pm »
Ah yes, well that's something I fixed. If the border is two pixel wide, it is not necessary to use intermediate pixels. There previous version was not consistent about this. Now I understand that you may want an inner margin to do that, however it would make more sense to do that with an additional property.

About the overlapping, I presume the buttons bounds are overlapping there, so that's not surprising.

That's the thing with backward compatibility, when you fix some bugs, that may change slightly what was working with previous versions.
Conscience is the debugger of the mind

Josh

  • Hero Member
  • *****
  • Posts: 1455
Re: Tbcpanel background bleed with border enabled.
« Reply #11 on: May 04, 2015, 09:33:16 am »
Hi Circular,

Thanks for your prompt reply.

The overlapping are tbclabel components, that have an overlap of 2, the same as the border width. preveiosuly they blended together now they overlap.

The tbcbutton ones are changing by the 'fix' you mention.

An additional property 'inner margin' would definitely help, if the default value was set so that the controls render as previous version, then it can be adjusted if required to 0 to get full area rendering.
Not sure how easy that would be, but would help anyone that have used the controls to generate their own Ui, or who have used to create a theme.

Again thanks for replying and fast response to any questions I have asked. :)
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Tbcpanel background bleed with border enabled.
« Reply #12 on: May 04, 2015, 12:50:30 pm »
Hi!

It is not possible to set a default value that would make the transition seemless, because before the fix, the inner margin was not consistent. It would change depending on whether the width is even or odd.

To make things simple, it would be possible to add a boolean "LegacyBorder", but then it would as easy to set the innermargin to 0.5 than to set LegacyBorder to True.

I guess to make it easy, the InnerMargin property must be at the root of the properties, not inside style structures. So that it is easy to select all the buttons, and set the margin to all of them.

Here is a patch that add the InnerMargin property:
http://forum.lazarus.freepascal.org/index.php/topic,24176.msg176834.html#msg176834
« Last Edit: May 04, 2015, 01:31:25 pm by circular »
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018