Recent

Author Topic: Some Properties to TPanel (so much needed)  (Read 3529 times)

Gald

  • Full Member
  • ***
  • Posts: 107
Some Properties to TPanel (so much needed)
« on: October 25, 2020, 04:12:00 pm »
Actual:
BevelColor
BevelInner
BevelOuter
BevelWidth


Improved:
BevelInner
BevelInnerWidth
BevelInnerColor

BevelOuter
BevelOuterWidth
BevelOuterColor


There's only one Color and Width to both, Inner and Outer, so they are mixing together.
This little improvement will change everything!

---

An additional request is that we have BevelStyles bvLowered, bvNone, bvRaised and bvSpace.
Honestly, I can't see the difference between them. Sorry.  :-[

It's possible to add bvShadow and bvGlow?
Lazarus 2.0.12 r64642 FPC 3.2.0 x86_64-win64-win32/win64/Manjaro KDE 21
AMD Ryzen 3 1300X Quad-Core Processor 3.50 GHz / 8,00 GB RAM / GTX 1500 TI / 2TB M.2 NVMe

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: Some Properties to TPanel (so much needed)
« Reply #1 on: October 25, 2020, 04:53:48 pm »
@ Honestly, I can't see the difference between them. Sorry.

They make different visual 3D effects in combination:

BevelOuterBevelInnerEffect
bvRaisedbvNoneraised box (default)
bvLoweredbvNonelowered box
bvRaisedbvLoweredraised frame
bvLoweredbvRaisedlowered frame

See also TBevel. It can draw simiral bevels but it is not a container.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

AlexTP

  • Hero Member
  • *****
  • Posts: 2384
    • UVviewsoft
Re: Some Properties to TPanel (so much needed)
« Reply #2 on: October 25, 2020, 05:56:04 pm »
So you suggest to add

BevelInnerWidth
BevelInnerColor

BevelOuterWidth
BevelOuterColor
?
I do not agree, they are very rarely needed, do this painting in OnPaint.

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Some Properties to TPanel (so much needed)
« Reply #3 on: October 25, 2020, 05:58:06 pm »
Create your own custom panel, is hard to modify old code that is supposed to work in a retro compatible way.

Gald

  • Full Member
  • ***
  • Posts: 107
Re: Some Properties to TPanel (so much needed)
« Reply #4 on: October 25, 2020, 06:42:12 pm »
Quote
They make different visual 3D effects in combination

Okay, it seems to work only when BevelColor is clDefault.

Quote
See also TBevel. It can draw similar Bevels but it is not a container.

I saw that, but TBevel doesn't have colors while TShape doesn't have TopLine, BottonLine, LeftLine and RightLine, like a TBevel.
And like you said, it is not a container.

The real good thing should be a TPanel with:

BevelTopInner
BevelTopInnerWidth
BevelTopInnerColor

BevelTopOuter
BevelTopOuterWidth
BevelTopOuterColor

BevelLeftInner
BevelLeftInnerWidth
BevelLeftInnerColor

BevelLeftOuter
BevelLeftOuterWidth
BevelLeftOuterColor

BevelRightInner
BevelRightInnerWidth
BevelRightInnerColor

BevelRightOuter
BevelRightOuterWidth
BevelRightOuterColor

BevelBottomInner
BevelBottomInnerWidth
BevelBottomInnerColor

BevelBottomOuter
BevelBottomOuterWidth
BevelBottomOuterColor

I've made a quickie sample to demonstrate what I mean.
Lazarus 2.0.12 r64642 FPC 3.2.0 x86_64-win64-win32/win64/Manjaro KDE 21
AMD Ryzen 3 1300X Quad-Core Processor 3.50 GHz / 8,00 GB RAM / GTX 1500 TI / 2TB M.2 NVMe

 

TinyPortal © 2005-2018