On Sat, 28 Jan 2006 22:56:24 +0100
Patrick Chevalley <[EMAIL PROTECTED]> wrote:

> Finally found the problem after I take a full diff with 8624 and add 
> debugln at each change.
> 
> The faulty is TGtkWidgetSet.Frame3d
> It really not like the nil here :
> 
>        gtk_paint_shadow(theStyle,
>                         AWindow, GTK_STATE_NORMAL,
>                         ShadowType,
>                         @Area,
>                         {ClientWidget}nil,
>                         {'button'}nil,
>                         ARect.Left+DCOrigin.X, ARect.Top+DCOrigin.Y,
>                         ARect.Right-ARect.Left, ARect.Bottom-ARect.Top);
> 
> Commenting this call or revert the following change and all work fine, 
> no need for DisableWidgetColor conditional.

:)

Applied. Thank You.

Mattias



> 
> Patrick
> 
> --- gtkwinapi.inc       (revision 8625)
> +++ gtkwinapi.inc       (revisiom 8624)
> @@ -3954,7 +3954,7 @@
>     (GTK_SHADOW_NONE, GTK_SHADOW_ETCHED_IN, GTK_SHADOW_ETCHED_OUT, 
> GTK_SHADOW_NONE);
> 
>   var
> -  //Widget, ClientWidget: PGtkWidget;
> +  Widget, ClientWidget: PGtkWidget;
>     i : integer;
>     DCOrigin: TPoint;
>     TheStyle: PGtkStyle;
> @@ -3975,6 +3975,13 @@
>         Result:= False;
>         exit;
>       end;
> +    Widget:=PGtkWidget(TDeviceContext(DC).Wnd);
> +    ClientWidget:=Widget;
> +    if Widget<>nil then begin
> +      ClientWidget:=GetFixedWidget(Widget);
> +      if ClientWidget=nil then
> +        ClientWidget:=Widget;
> +    end;
>       AWindow:=Drawable;
>       DCOrigin:=GetDCOffset(TDeviceContext(DC));
>       Area.X:=ARect.Left+DCOrigin.X;
> @@ -3991,12 +3998,12 @@
>       //'');
> 
>       for i:= 1 to FrameWidth do begin
> -      gtk_paint_shadow(theStyle,
> +      gtk_paint_shadow(TheStyle,
>                          AWindow, GTK_STATE_NORMAL,
>                          ShadowType,
>                          @Area,
> -                       {ClientWidget}nil,
> -                       {'button'}nil,
> +                       ClientWidget,
> +                       'button',
>                          ARect.Left+DCOrigin.X, ARect.Top+DCOrigin.Y,
>                          ARect.Right-ARect.Left, ARect.Bottom-ARect.Top);
>         // inflate the rectangle (! ARect will be returned to the user 
> with this)
> 
> _________________________________________________________________
>      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