Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-22 Thread Mattias Gaertner
On Sun, 21 May 2006 15:49:28 +0200
darekm <[EMAIL PROTECTED]> wrote:

> Pleas test this patch
> 
> problem was when speedbutton.transparent=true

Applied. Thanks.

Mattias



> 
> there is problem with tGroupBox on GTK2, MouseEnter is not triggered and 
> then Flat not work

Please add this to the bug tracker.

Mattias


> 
> 
> 
> 
> 
> 
> Marien van Westen wrote:
> 
> >
> >
> > On 5/20/06, *DarekM* <[EMAIL PROTECTED] > 
> > wrote:
> >
> > Marien van Westen napisa__(a):
> >
> >>
> >>
> >> On 5/20/06, *DarekM* <[EMAIL PROTECTED]
> >> > wrote:
> >>
> >> Micha Nelissen napisa__(a):
> >>
> >>On Sat, 20 May 2006 10:37:01 +0200
> >>DarekM <[EMAIL PROTECTED]>  wrote:
> >>
> >>  
> >>
> >>>Transparency work both,
> >>>with flat=true button  has border only when mouse is over
> >>>with transparency=true don't fill inner area
> >>>
> >>>
> >>That contradicts Marien's picture
> >>'speedbuttons-panel-delphi-runtime.png' (the first one).
> >>  
> >>
> >>
> >> This is slide from my application write in Delphi
> >> all buttons are transparent=true and flat=true
> >> only button under mouse has border
> >>
> >> different is when we work on IDE,
> >> then button has always border
> >>
> >>
> >> In my app I have a signal generater and the speedbuttons only
> >> have a Caption to select frequency range.
> >> In Delphi I can see the different buttons, but not in Lazarus.
> >
> > Have You property Flat=true ?
> >
> >
> >> I attach two pictures to show the difference.
> >> N.B. I tried to improve things bij placing the buttons in a
> >> groupbox in the Lazarus version, hence the line above the buttons
> >> (as you can see that's not an improvement).
> >
> I`m not sure if You have problem with line above, but to disable it 
> uncheck ToolBar2.edgeBorder.top
> 
> Darek
> 

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


Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-22 Thread Marien van Westen
On 5/21/06, darekm <[EMAIL PROTECTED]> wrote:
Pleas test this patchproblem was when speedbutton.transparent=truethere is problem with tGroupBox on GTK2, MouseEnter is not triggered andthen Flat not workOk DarekM,I applied the patch. I tested this with win32. Patch is OK. Behaviour is the same as in my delphi prog now.
I hope there won't be unforeseen effects in Linux  programs.Thanks for the patch., Marien


Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-21 Thread darekm

Pleas test this patch

problem was when speedbutton.transparent=true

there is problem with tGroupBox on GTK2, MouseEnter is not triggered and 
then Flat not work







Marien van Westen wrote:




On 5/20/06, *DarekM* <[EMAIL PROTECTED] > 
wrote:


Marien van Westen napisał(a):




On 5/20/06, *DarekM* <[EMAIL PROTECTED]
> wrote:

Micha Nelissen napisał(a):

On Sat, 20 May 2006 10:37:01 +0200
DarekM <[EMAIL PROTECTED]>  wrote:

 


Transparency work both,
with flat=true button  has border only when mouse is over
with transparency=true don't fill inner area
   


That contradicts Marien's picture
'speedbuttons-panel-delphi-runtime.png' (the first one).
 



This is slide from my application write in Delphi
all buttons are transparent=true and flat=true
only button under mouse has border

different is when we work on IDE,
then button has always border


In my app I have a signal generater and the speedbuttons only
have a Caption to select frequency range.
In Delphi I can see the different buttons, but not in Lazarus.


Have You property Flat=true ?



I attach two pictures to show the difference.
N.B. I tried to improve things bij placing the buttons in a
groupbox in the Lazarus version, hence the line above the buttons
(as you can see that's not an improvement).


I`m not sure if You have problem with line above, but to disable it 
uncheck ToolBar2.edgeBorder.top


Darek

Index: include/speedbutton.inc
===
--- include/speedbutton.inc (wersja 9299)
+++ include/speedbutton.inc (kopia robocza)
@@ -279,6 +279,8 @@
   if FFlat and not FMouseInControl and not (FState in [bsDown, bsExclusive]) 
then
   begin
 Result := DFCS_FLAT;
+if not Enabled then
+  inc(Result,DFCS_INACTIVE)
   end else begin
 Result:=DFCS_BUTTONPUSH;
 if FState in [bsDown, bsExclusive] then 
@@ -413,13 +415,9 @@
   // do not draw anything if flat and mouse not in control (simplified)
   if Transparent then begin
 if (FLastDrawFlags and DFCS_FLAT) = 0 then begin
-  if MouseInControl then begin
if (FLastDrawFlags and DFCS_PUSHED) <>0 then xBevel := bvLowered
else xBevel := bvRaised;
 Canvas.Frame3D(PaintRect,1,xBevel);
-  end else if (FLastDrawFlags and DFCS_PUSHED) <>0 then begin
-Canvas.Frame3D(PaintRect,1,bvLowered);
-  end;
   InflateRect(PaintRect, -1, -1);
 end;
   end else begin
@@ -745,7 +743,6 @@
 begin
   inherited MouseEnter;
   if csDesigning in ComponentState then exit;
-
   if not FMouseInControl
   and Enabled and (GetCapture = 0)
   then begin



Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-21 Thread Marien van Westen
DarekM,I got a message my zip-file was blocked. I saw recent posts were the blocked message was received. Did you get my zip-file?Marien


Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-20 Thread DarekM




Marien van Westen napisał(a):

  
  On 5/20/06, DarekM <[EMAIL PROTECTED]> wrote:
  

Micha Nelissen napisał(a):


On Sat, 20 May 2006 10:37:01 +0200
DarekM <[EMAIL PROTECTED]> wrote:

  

  Transparency work both,
with flat=true button  has border only when mouse is over
with transparency=true don't fill inner area


That contradicts Marien's picture
'speedbuttons-panel-delphi-runtime.png' (the first one).
  


This is slide from my application write in Delphi
all buttons are transparent=true and flat=true
only button under mouse has border

different is when we work on IDE,
then button has always border


  
  
  
In my app I have a signal generater and the speedbuttons only have a
Caption to select frequency range.
In Delphi I can see the different buttons, but not in Lazarus.

Have You property Flat=true ?

I attach two pictures to show the difference.
  
N.B. I tried to improve things bij placing the buttons in a groupbox in
the Lazarus version, hence the line above the buttons (as you can see
that's not an improvement).


Can You send test program
Darek





Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-20 Thread DarekM




Micha Nelissen napisał(a):

  On Sat, 20 May 2006 14:54:40 +0200
DarekM <[EMAIL PROTECTED]> wrote:

  
  

  
Transparency work both,
with flat=true button  has border only when mouse is over
with transparency=true don't fill inner area

  
  That contradicts Marien's picture
'speedbuttons-panel-delphi-runtime.png' (the first one).
  

This is slide from my application write in Delphi
all buttons are transparent=true and flat=true
only button under mouse has border

  
  
No I mean, with Flat=false, then the button is not transparent. This is
clearly visible in Marien's screenshot. You say that the button is
transparent in both cases, but clearly it is not.
  

Yes, now I see (when Flat=false then not carry transparent)
Who prepare patch (If nobody i send it tomorrow)

Darek





Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-20 Thread Marien van Westen
On 5/20/06, DarekM <[EMAIL PROTECTED]> wrote:



  
  


Micha Nelissen napisał(a):

  On Sat, 20 May 2006 10:37:01 +0200DarekM <[EMAIL PROTECTED]> wrote:  
  
Transparency work both,with flat=true button  has border only when mouse is overwith transparency=true don't fill inner area
  
  That contradicts Marien's picture'speedbuttons-panel-delphi-runtime.png' (the first one).  


This is slide from my application write in Delphi
all buttons are transparent=true and flat=true
only button under mouse has border

different is when we work on IDE,
then button has always border
In my app I have a signal generater and the speedbuttons only have a Caption to select frequency range.In Delphi I can see the different buttons, but not in Lazarus.I attach two pictures to show the difference.
N.B. I tried to improve things bij placing the buttons in a groupbox in the Lazarus version, hence the line above the buttons (as you can see that's not an improvement).Marien


speedbuttons-delphi.png
Description: PNG image


speedbuttons-lazarus.png
Description: PNG image


Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-20 Thread Micha Nelissen
On Sat, 20 May 2006 14:54:40 +0200
DarekM <[EMAIL PROTECTED]> wrote:

> >> Transparency work both,
> >> with flat=true button  has border only when mouse is over
> >> with transparency=true don't fill inner area
> >
> > That contradicts Marien's picture
> > 'speedbuttons-panel-delphi-runtime.png' (the first one).
> 
> This is slide from my application write in Delphi
> all buttons are transparent=true and flat=true
> only button under mouse has border

No I mean, with Flat=false, then the button is not transparent. This is
clearly visible in Marien's screenshot. You say that the button is
transparent in both cases, but clearly it is not.

Micha

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


Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-20 Thread DarekM




Micha Nelissen napisał(a):

  On Sat, 20 May 2006 10:37:01 +0200
DarekM <[EMAIL PROTECTED]> wrote:

  
  
Transparency work both,
with flat=true button  has border only when mouse is over
with transparency=true don't fill inner area

  
  
That contradicts Marien's picture
'speedbuttons-panel-delphi-runtime.png' (the first one).
  


This is slide from my application write in Delphi
all buttons are transparent=true and flat=true
only button under mouse has border

different is when we work on IDE,
then button has always border

Darek






Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-20 Thread Marien van Westen
On 5/20/06, Micha Nelissen <[EMAIL PROTECTED]> wrote:
On Sat, 20 May 2006 10:37:01 +0200DarekM <[EMAIL PROTECTED]> wrote:> Transparency work both,> with flat=true button  has border only when mouse is over
> with transparency=true don't fill inner areaThat contradicts Marien's picture'speedbuttons-panel-delphi-runtime.png' (the first one).Yes, in Delphi speedbuttons have a border.  The property Flat is untouched in all cases. In Delphi and Lazarus the default of Flat is False.
Marien


Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-20 Thread Micha Nelissen
On Sat, 20 May 2006 10:37:01 +0200
DarekM <[EMAIL PROTECTED]> wrote:

> Transparency work both,
> with flat=true button  has border only when mouse is over
> with transparency=true don't fill inner area

That contradicts Marien's picture
'speedbuttons-panel-delphi-runtime.png' (the first one).

Micha

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


Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-20 Thread DarekM




Micha Nelissen napisał(a):

  On Fri, 19 May 2006 21:01:03 +0200
"Marien van Westen" <[EMAIL PROTECTED]> wrote:

  
  

  Maybe at design time transparency and flat are disabled.
Please run the program under Delphi.

At run-time the speedbuttons have the same behaviour.
  

I show some screenshots. Note that when transparacy is true and the mouse is
over the button (runtime only) the borders are visible (2) otherwise  the
borders are invisible.

  
  
Transparency is only effective when Flat is true ? As Flat is by default
false, the default of Transparent does not really matter until you set Flat
to true ?
  

Transparency work both, 
with flat=true button  has border only when mouse is over 
with transparency=true don't fill inner area

Darek





Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-19 Thread Micha Nelissen
On Fri, 19 May 2006 21:01:03 +0200
"Marien van Westen" <[EMAIL PROTECTED]> wrote:

> > Maybe at design time transparency and flat are disabled.
> > Please run the program under Delphi.
> >
> > At run-time the speedbuttons have the same behaviour.
> 
> I show some screenshots. Note that when transparacy is true and the mouse is
> over the button (runtime only) the borders are visible (2) otherwise  the
> borders are invisible.

Transparency is only effective when Flat is true ? As Flat is by default
false, the default of Transparent does not really matter until you set Flat
to true ?

Micha

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


Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-19 Thread Marien van Westen
> I Delphi (V6 open edition) the speedbuttons have a border. When I place a> speedbutton on a panel I cannot see the text "Panel1" through the
> speedbutton although the transparancy is set true (changing this to false> doesn't change this. Delphi bug?). The appearence is the same at> design-time and at runtime.> Attachment shows how it looks in Delphi
Maybe at design time transparency and flat are disabled.Please run the program under Delphi.At run-time the speedbuttons have the same behaviour.I show some screenshots. Note that when transparacy is true and the mouse is over the button (runtime only) the borders are visible (2) otherwise  the borders are invisible.
I hope those screenshots  will help .I only tested this in Windows of course.Greetings, Marien 


speedbuttons-panel-delphi-runtime.png
Description: PNG image


speedbuttons-panel-lazarus-designtime-transparacy-false.png
Description: PNG image


speedbuttons-panel-lazarus-designtime-transparancy-true.png
Description: PNG image


speedbuttons-panel-lazarus-runtime-transparancy false.png
Description: PNG image


speedbuttons-panel-lazarus-runtime-transparancy true-1.png
Description: PNG image


speedbuttons-panel-lazarus-runtime-transparancy true-2.png
Description: PNG image


Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-19 Thread Mattias Gaertner
On Fri, 19 May 2006 14:39:00 +0200
"Marien van Westen" <[EMAIL PROTECTED]> wrote:

> On 5/19/06, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> >
> > On Fri, 19 May 2006 09:01:50 +0200
> > "Marien van Westen" <[EMAIL PROTECTED]> wrote:
> >
> > > >
> > > >
> > > > Delphi compatibility.
> > >
> > >
> > > Delphi compatability is not the issue here I think.
> >
> > I meant: for Delphi compatibility Transparent = true is the default.
> 
> 
> Ok, yes, you are right
> 
> > The strange thing is
> > > that speedbuttons don't have borders in the designer, but at runtime
> > > the borders show when the mouse is over the speedbutton.
> > >
> > > I think speedbuttons  are also used in menus where you don't want to
> > have
> > > bordres around them, but when you have a row of speedbuttons somewere
> > > else, the user might  want to have borders around them.
> > > I also noticed that the buttons are transparent  even when
> > > transparancy
> > is
> > > false.
> > > I think transparancy somway interferes  with the borderstyle of the
> > > buttons.
> > >
> > > Shall I report this as a bug?
> >
> > How does it work under Delphi?
> 
> 
> I Delphi (V6 open edition) the speedbuttons have a border. When I place a
> speedbutton on a panel I cannot see the text "Panel1" through the
> speedbutton although the transparancy is set true (changing this to false
> doesn't change this. Delphi bug?). The appearence is the same at
> design-time and at runtime.
> Attachment shows how it looks in Delphi

Maybe at design time transparency and flat are disabled.
Please run the program under Delphi.

Mattias

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


Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-19 Thread Marien van Westen
On 5/19/06, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
On Fri, 19 May 2006 09:01:50 +0200"Marien van Westen" <[EMAIL PROTECTED]> wrote:> >> >> > Delphi compatibility.
>>> Delphi compatability is not the issue here I think.I meant: for Delphi compatibility Transparent = true is the default.Ok, yes, you are right 
> The strange thing is> that speedbuttons don't have borders in the designer, but at runtime the> borders show when the mouse is over the speedbutton.>> I think speedbuttons  are also used in menus where you don't want to have
> bordres around them, but when you have a row of speedbuttons somewere> else, the user might  want to have borders around them.> I also noticed that the buttons are transparent  even when transparancy is
> false.> I think transparancy somway interferes  with the borderstyle of the> buttons.>> Shall I report this as a bug?How does it work under Delphi?I Delphi (V6 open edition) the speedbuttons have a border. When I place a speedbutton on a panel I cannot see the text "Panel1" through the speedbutton although the transparancy is set true (changing this to false doesn't change this. Delphi bug?). The appearence is the same at design-time and at runtime.
Attachment shows how it looks in DelphiMarien


speedbuttons-panel-delphi.png
Description: PNG image


Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-19 Thread Mattias Gaertner
On Fri, 19 May 2006 09:01:50 +0200
"Marien van Westen" <[EMAIL PROTECTED]> wrote:

> >
> >
> > Delphi compatibility.
> 
> 
> Delphi compatability is not the issue here I think.

I meant: for Delphi compatibility Transparent = true is the default. 


> The strange thing is
> that speedbuttons don't have borders in the designer, but at runtime the
> borders show when the mouse is over the speedbutton.
> 
> I think speedbuttons  are also used in menus where you don't want to have
> bordres around them, but when you have a row of speedbuttons somewere
> else, the user might  want to have borders around them.
> I also noticed that the buttons are transparent  even when transparancy is
> false.
> I think transparancy somway interferes  with the borderstyle of the
> buttons.
> 
> Shall I report this as a bug?

How does it work under Delphi?


Mattias

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


Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-19 Thread Michael Van Canneyt



On Fri, 19 May 2006, Marien van Westen wrote:




Delphi compatibility.



Delphi compatability is not the issue here I think. The strange thing is
that speedbuttons don't have borders in the designer, but at runtime the
borders show when the mouse is over the speedbutton.


This is standard behaviour for a 'flat' look.

Michael.

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


Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-19 Thread Marien van Westen
Delphi compatibility.Delphi compatability is not the issue here I think. The strange thing is that speedbuttons don't have borders in the designer, but at runtime the borders show when the mouse is over the speedbutton.
I think speedbuttons  are also used in menus where you don't want to have bordres around them, but when you have a row of speedbuttons somewere else, the user might  want to have borders around them.I also noticed that the buttons are transparent  even when transparancy is false.
I think transparancy somway interferes  with the borderstyle of the buttons.Shall I report this as a bug?Marien


Re: [lazarus] Speedbutton property transparant default value should be false.

2006-05-18 Thread Mattias Gaertner
On Sat, 13 May 2006 21:04:18 +0200
"Marien van Westen" <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> I noticed that in the last snapshot the Speedbuttons have a property
> transparant (is this a recent change?)
> The default value is True, but placing a speedbutton on a form results in
> a button without borders.
> I suggest to make the default value for Transparant False.
> Or is there another reason to make it True?

Delphi compatibility.

It is planned to setup the default values for newly created components in
the designer via the Object Inspector.
If there is a volunteer, who wnats to add this feature, please ask, and I
can help.

 
> Greetings Marien
> 
> P.S. Lazarus is improving every day. I think about replacing Delphi by
> Lazarus for my lectures on programming !

:)


Mattias

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


[lazarus] Speedbutton property transparant default value should be false.

2006-05-13 Thread Marien van Westen
Hello,I noticed that in the last snapshot the Speedbuttons have a property transparant (is this a recent change?)The default value is True, but placing a speedbutton on a form results in a button without borders.
I suggest to make the default value for Transparant False. Or is there another reason to make it True?Greetings MarienP.S. Lazarus is improving every day. I think about replacing Delphi by Lazarus for my lectures on programming !