mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 03:59:13 +02:00
Gtk widget => changed from ifdef gtk2 => ifNdef gtk1
git-svn-id: trunk@20007 -
This commit is contained in:
parent
3f7ae88079
commit
fd3a03f494
@ -28,7 +28,7 @@
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
function DoDeliverPaintMessage(const Target: TObject; var PaintMsg: TLMPaint): PtrInt;
|
function DoDeliverPaintMessage(const Target: TObject; var PaintMsg: TLMPaint): PtrInt;
|
||||||
{$ifdef gtk2}
|
{$ifndef gtk1}
|
||||||
var
|
var
|
||||||
WidgetInfo: PWidgetInfo;
|
WidgetInfo: PWidgetInfo;
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -51,7 +51,7 @@ begin
|
|||||||
|
|
||||||
Result := DeliverMessage(Target, PaintMsg);
|
Result := DeliverMessage(Target, PaintMsg);
|
||||||
|
|
||||||
{$ifdef gtk2}
|
{$ifndef gtk1}
|
||||||
if (TObject(Target) is TCustomControl) then begin
|
if (TObject(Target) is TCustomControl) then begin
|
||||||
WidgetInfo := GetWidgetInfo(PGtkWidget(TCustomControl(Target).Handle), False);
|
WidgetInfo := GetWidgetInfo(PGtkWidget(TCustomControl(Target).Handle), False);
|
||||||
if WidgetInfo <> nil then
|
if WidgetInfo <> nil then
|
||||||
|
@ -6842,7 +6842,7 @@ var
|
|||||||
gdkRect : TGDKRectangle;
|
gdkRect : TGDKRectangle;
|
||||||
Widget, PaintWidget: PGtkWidget;
|
Widget, PaintWidget: PGtkWidget;
|
||||||
LCLObject: TObject;
|
LCLObject: TObject;
|
||||||
{$IfDef GTK2}
|
{$IfNDef GTK1}
|
||||||
WidgetInfo: PWidgetInfo;
|
WidgetInfo: PWidgetInfo;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
r: TRect;
|
r: TRect;
|
||||||
@ -6885,7 +6885,7 @@ begin
|
|||||||
gdkRect.Width := (Rect^.Right - Rect^.Left);
|
gdkRect.Width := (Rect^.Right - Rect^.Left);
|
||||||
gdkRect.Height := (Rect^.Bottom - Rect^.Top);
|
gdkRect.Height := (Rect^.Bottom - Rect^.Top);
|
||||||
|
|
||||||
{$IfDef GTK2}
|
{$IfNDef GTK1}
|
||||||
if (PaintWidget<>nil) and GTK_WIDGET_NO_WINDOW(PaintWidget)
|
if (PaintWidget<>nil) and GTK_WIDGET_NO_WINDOW(PaintWidget)
|
||||||
and (not GtkWidgetIsA(PGTKWidget(PaintWidget),GTKAPIWidget_GetType))
|
and (not GtkWidgetIsA(PGTKWidget(PaintWidget),GTKAPIWidget_GetType))
|
||||||
and (Rect<>nil)
|
and (Rect<>nil)
|
||||||
@ -6905,7 +6905,7 @@ begin
|
|||||||
|
|
||||||
gtk_widget_queue_draw_area(PaintWidget,
|
gtk_widget_queue_draw_area(PaintWidget,
|
||||||
gdkRect.X,gdkRect.Y,gdkRect.Width,gdkRect.Height);
|
gdkRect.X,gdkRect.Y,gdkRect.Width,gdkRect.Height);
|
||||||
{$IfDef GTK2}
|
{$IfNDef GTK1}
|
||||||
//DebugLn(['TGtkWidgetSet.InvalidateRect ',GetWidgetDebugReport(Widget),' IsAPI=',GtkWidgetIsA(PGTKWidget(Widget),GTKAPIWidget_GetType)]);
|
//DebugLn(['TGtkWidgetSet.InvalidateRect ',GetWidgetDebugReport(Widget),' IsAPI=',GtkWidgetIsA(PGTKWidget(Widget),GTKAPIWidget_GetType)]);
|
||||||
if GtkWidgetIsA(PGTKWidget(Widget),GTKAPIWidget_GetType) then
|
if GtkWidgetIsA(PGTKWidget(Widget),GTKAPIWidget_GetType) then
|
||||||
GTKAPIWidget_InvalidateCaret(PGTKAPIWidget(Widget));
|
GTKAPIWidget_InvalidateCaret(PGTKAPIWidget(Widget));
|
||||||
|
Loading…
Reference in New Issue
Block a user