mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-01 15:03:57 +02:00
LCL: GTK2: Show controls disabled when Enabled = False. Regression from revision 58448 #9733fa84ab.
git-svn-id: trunk@58758 -
This commit is contained in:
parent
de1dca667b
commit
13e0fb24e1
@ -215,6 +215,7 @@ begin
|
||||
Set_RC_Name(AWinControl, {%H-}PGtkWidget(Result));
|
||||
if not AWinControl.HandleObjectShouldBeVisible and not (csDesigning in AWinControl.ComponentState) then
|
||||
gtk_widget_hide({%H-}PGtkWidget(Result));
|
||||
gtk_widget_set_sensitive({%H-}PGtkWidget(Result), AParams.Style and WS_DISABLED = 0);
|
||||
SetCallbacks({%H-}PGtkWidget(Result), WidgetInfo);
|
||||
end;
|
||||
|
||||
|
@ -233,6 +233,7 @@ begin
|
||||
Set_RC_Name(AWinControl, P);
|
||||
if not AWinControl.HandleObjectShouldBeVisible and not (csDesigning in AWinControl.ComponentState) then
|
||||
gtk_widget_hide(p);
|
||||
gtk_widget_set_sensitive(p, AParams.Style and WS_DISABLED = 0);
|
||||
SetCallbacks(p, WidgetInfo);
|
||||
end;
|
||||
|
||||
|
@ -499,6 +499,7 @@ begin
|
||||
|
||||
GTK_WIDGET_SET_FLAGS(Widget, GTK_CAN_FOCUS);
|
||||
InternalSetStyle(PGtkProgressBar(Widget), TCustomProgressBar(AWinControl).Style);
|
||||
gtk_widget_set_sensitive(Widget, AParams.Style and WS_DISABLED = 0);
|
||||
|
||||
TGtk2WSWinControl.SetCallbacks(PGtkObject(Widget), TComponent(WidgetInfo^.LCLObject));
|
||||
end;
|
||||
@ -592,6 +593,7 @@ begin
|
||||
DebugGtkWidgets.MarkCreated(EventBox, dbgsName(AWinControl));
|
||||
{$ENDIF}
|
||||
WidgetInfo := CreateWidgetInfo({%H-}Pointer(Result), AWinControl, AParams);
|
||||
gtk_widget_set_sensitive(EventBox, AParams.Style and WS_DISABLED = 0);
|
||||
Set_RC_Name(AWinControl, EventBox);
|
||||
SetCallbacks(EventBox, WidgetInfo);
|
||||
end;
|
||||
|
@ -184,6 +184,7 @@ begin
|
||||
Allocation.Width := AParams.Width;
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(Widget, @Allocation);
|
||||
gtk_widget_set_sensitive(Widget, AParams.Style and WS_DISABLED = 0);
|
||||
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
|
||||
|
@ -158,6 +158,7 @@ begin
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
if not AWinControl.HandleObjectShouldBeVisible and not (csDesigning in AWinControl.ComponentState) then
|
||||
gtk_widget_hide(Widget);
|
||||
gtk_widget_set_sensitive(Widget, AParams.Style and WS_DISABLED = 0);
|
||||
SetCallbacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
|
@ -792,6 +792,7 @@ begin
|
||||
// Sets the callbacks
|
||||
if not AWinControl.HandleObjectShouldBeVisible and not (csDesigning in AWinControl.ComponentState) then
|
||||
gtk_widget_hide(p);
|
||||
gtk_widget_set_sensitive(p, AParams.Style and WS_DISABLED = 0);
|
||||
SetCallbacks(p, WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -939,6 +940,7 @@ begin
|
||||
gtk_widget_hide({%H-}PGtkWidget(Result))
|
||||
else
|
||||
gtk_widget_show({%H-}PGtkWidget(Result));
|
||||
gtk_widget_set_sensitive({%H-}PGtkWidget(Result), AParams.Style and WS_DISABLED = 0);
|
||||
|
||||
Set_RC_Name(AWinControl, {%H-}PGtkWidget(Result));
|
||||
SetCallbacks({%H-}PGtkWidget(Result), WidgetInfo);
|
||||
@ -1194,6 +1196,7 @@ begin
|
||||
gtk_widget_hide(Widget)
|
||||
else
|
||||
gtk_widget_show(Widget);
|
||||
gtk_widget_set_sensitive(Widget, AParams.Style and WS_DISABLED = 0);
|
||||
Result := TLCLIntfHandle({%H-}PtrUInt(Widget));
|
||||
{$IFDEF DebugLCLComponents}
|
||||
DebugGtkWidgets.MarkCreated(Widget, dbgsName(AWinControl));
|
||||
@ -2248,6 +2251,7 @@ begin
|
||||
gtk_widget_hide(Box)
|
||||
else
|
||||
gtk_widget_show(Box);
|
||||
gtk_widget_set_sensitive(Box, AParams.Style and WS_DISABLED = 0);
|
||||
|
||||
Result := TLCLIntfHandle({%H-}PtrUInt(Box));
|
||||
end;
|
||||
@ -2358,6 +2362,7 @@ begin
|
||||
Allocation.Width := AParams.Width;
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(FrameBox, @Allocation);
|
||||
gtk_widget_set_sensitive(FrameBox, AParams.Style and WS_DISABLED = 0);
|
||||
|
||||
Set_RC_Name(AWinControl, FrameBox);
|
||||
SetCallbacks(FrameBox, WidgetInfo);
|
||||
@ -2578,6 +2583,7 @@ begin
|
||||
gtk_widget_hide(EventBox)
|
||||
else
|
||||
gtk_widget_show(EventBox);
|
||||
gtk_widget_set_sensitive(EventBox, AParams.Style and WS_DISABLED = 0);
|
||||
end;
|
||||
|
||||
class function TGtk2WSButton.GetText(const AWinControl: TWinControl; var AText: String): Boolean;
|
||||
@ -2710,6 +2716,7 @@ begin
|
||||
DebugGtkWidgets.MarkCreated(Widget, dbgsName(AWinControl));
|
||||
{$ENDIF}
|
||||
WidgetInfo := CreateWidgetInfo({%H-}Pointer(Result), AWinControl, AParams);
|
||||
gtk_widget_set_sensitive(Widget, AParams.Style and WS_DISABLED = 0);
|
||||
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallbacks(Widget, WidgetInfo);
|
||||
@ -2809,6 +2816,7 @@ begin
|
||||
Allocation.Width := AParams.Width;
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(Widget, @Allocation);
|
||||
gtk_widget_set_sensitive(Widget, AParams.Style and WS_DISABLED = 0);
|
||||
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
TGtk2WSCustomCheckBox.SetCallbacks(Widget, WidgetInfo);
|
||||
@ -2835,6 +2843,7 @@ begin
|
||||
Allocation.Width := AParams.Width;
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(Widget, @Allocation);
|
||||
gtk_widget_set_sensitive(Widget, AParams.Style and WS_DISABLED = 0);
|
||||
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
TGtk2WSCustomCheckBox.SetCallbacks(Widget, WidgetInfo);
|
||||
@ -2898,6 +2907,7 @@ begin
|
||||
Allocation.Width := AParams.Width;
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate({%H-}PGtkWidget(Result), @Allocation);
|
||||
gtk_widget_set_sensitive({%H-}PGtkWidget(Result), AParams.Style and WS_DISABLED = 0);
|
||||
|
||||
Set_RC_Name(AWinControl, {%H-}PGtkWidget(Result));
|
||||
SetCallbacks({%H-}PGtkWidget(Result), WidgetInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user