Mattias Gaertner wrote:

On Fri, 03 Mar 2006 23:10:41 +0100
darekm <[EMAIL PROTECTED]> wrote:

[...]
A button under gtk1 is an area, not just the frame. Some themes define
a >>simple darkened area when presses, some  some define whole images
(e.g. >>round buttons). Maybe gtk2 has more possibilities for
TSpeedButton. >>
Interesting are there possibilities, which we can use in all OS, of course we can implement all myself, but we are limited by LCL API, for example now I can't change color of shadow (tButton have not thous properties) I think, that we should implement more flexible widgets, not so dependent from desired library (GTK, WIN, QT)

Yes, but then it will be a TButtonPlus. A normal TButton is the normal
button of the theme.

I talk about tSpeedButton not tButton


[...]
I don't know, what windows can do with DrawFrameControl, but under gtk it
draws an area in a specific style. If this is a button style, and the
theme defines an image, it paints it.

If I want (as programmer) to one of buttons will be red, user should'n change it by change theme

Correct. But if you want a 'red' button, then you want a custom drawn
button, not a TButton.
If 'red' buttons are needed that often, then we should add a
TCustomDrawnButton (or whatever name fits) with properties like Color,
Frame, BorderWidth, TextAlignment, WordWrap, ... .
This has five advantages:
- the button will really look the same under all platforms
- less code in LCL interfaces
- better for smartlinking
- more flexibility
- cleaner design (themed and non themed controls)
that's what for is property color,
and maybe order should be different: first without theme and second (inherited) with.
or (better) tControl should have property - with or without theme


for tButton all depend from widgets, but for me in tSpeedButton all should be independent. (GTK has't two widgets)
Gtk has less widgets, because the idea is combine them. A TGroupbox is a
single widget under windows, while under gtk it needs two. For gtk it is
pretty normal to put a 'listbox' into a menu. That's why you have more
possibilties.
A TSpeedButton that is used a button and that draws some rectangles, when
all other widgets on the application have shaded round widgets looks very
ugly. Especially if you use broken themes, that merely defines images and
no colors.
DrawFrameControl not avoid this

It should. If not, you found a bug.

DrawFrameControl use only two function
     If (Shadow=GTK_SHADOW_NONE) then
       gtk_paint_flat_box(aStyle,aDC.Drawable,
     else
       gtk_paint_box(aStyle,aDC.Drawable,

both draw rectangle,
As I know, Style either don't have place to set rounded widgets
It can only set pixmap (that's is only difference to windows)


and we not use this to tButton, then why use it to tSpeedButton



it's only my suggestion
What is the trouble with theme painted speedbuttons?
it's not work

Can you give more details?

simple: when I set color:=clRed then not change color (like in others controls)

Mattias

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to