mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 14:09:31 +02:00
added -dDisableWidgetColor
git-svn-id: trunk@8638 -
This commit is contained in:
parent
9789a6b124
commit
9a738a013a
@ -1334,10 +1334,14 @@ begin
|
||||
ChangeFGColor:=((FGColor and SYS_COLOR_BASE)=0) and (FGColor<>clNone);
|
||||
ChangeBGColor:=((BGColor and SYS_COLOR_BASE)=0) and (BGColor<>clNone);
|
||||
if (not ChangeFGColor) and (not ChangeBGColor) then exit;
|
||||
|
||||
{$IFDEF DisableWidgetColor}
|
||||
exit;
|
||||
{$ENDIF}
|
||||
|
||||
if (GTK_WIDGET_REALIZED(AWidget)) then begin
|
||||
WindowStyle := gtk_style_copy(gtk_widget_get_style (AWidget));
|
||||
end else begin
|
||||
end else begin
|
||||
WindowStyle := gtk_style_copy(gtk_rc_get_style (AWidget));
|
||||
end;
|
||||
if (Windowstyle = nil) then begin
|
||||
@ -1365,7 +1369,6 @@ begin
|
||||
gtk_widget_set_style(aWidget,windowStyle);
|
||||
end;
|
||||
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
procedure TGtkWidgetSet.RealizeWidgetSize(Widget: PGtkWidget; NewWidth,
|
||||
NewHeight: integer);
|
||||
|
@ -384,7 +384,7 @@ begin
|
||||
GtkWidgetSet.SetWidgetColor(Widget, AWinControl.font.color, AWinControl.color,
|
||||
[GTK_STATE_NORMAL,GTK_STATE_ACTIVE,GTK_STATE_PRELIGHT,GTK_STATE_SELECTED]);
|
||||
|
||||
if BitBtnInfo^.LabelWidget = nil then Exit;
|
||||
if (BitBtnInfo=nil) or (BitBtnInfo^.LabelWidget = nil) then Exit;
|
||||
GtkWidgetSet.SetWidgetColor(BitBtnInfo^.LabelWidget, AWinControl.font.color,
|
||||
AWinControl.color,
|
||||
[GTK_STATE_NORMAL,GTK_STATE_ACTIVE,GTK_STATE_PRELIGHT,GTK_STATE_SELECTED]);
|
||||
|
@ -416,6 +416,7 @@ var
|
||||
Widget: PGtkWidget;
|
||||
Allocation: TGTKAllocation;
|
||||
begin
|
||||
if not AWinControl.HandleAllocated then exit;
|
||||
Widget := PGtkWidget(AWinControl.Handle);
|
||||
Allocation.X := Widget^.Allocation.X;
|
||||
Allocation.Y := Widget^.Allocation.Y;
|
||||
@ -426,6 +427,7 @@ end;
|
||||
|
||||
procedure TGtkWSWinControl.SetColor(const AWinControl: TWinControl);
|
||||
begin
|
||||
if not AWinControl.HandleAllocated then exit;
|
||||
if ((csOpaque in AWinControl.ControlStyle)
|
||||
and GtkWidgetIsA(pGtkWidget(AWinControl.handle),GTKAPIWidget_GetType)) then
|
||||
exit;
|
||||
@ -480,6 +482,7 @@ var
|
||||
aLabel, pLabel: pchar;
|
||||
AccelKey : integer;
|
||||
begin
|
||||
if not AWinControl.HandleAllocated then exit;
|
||||
//TODO: create classprocedures for this in the corresponding classes
|
||||
|
||||
P := Pointer(AWinControl.Handle);
|
||||
|
Loading…
Reference in New Issue
Block a user