mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 05:00:46 +01:00
gtk intf: small optimization as suggested by Luiz
git-svn-id: trunk@10726 -
This commit is contained in:
parent
15abcba5a2
commit
61700dad67
@ -2677,22 +2677,21 @@ var
|
||||
|
||||
Style := GetStyle(lgsCheckbox);
|
||||
|
||||
If Style = nil then
|
||||
If Style = nil then begin
|
||||
Style := GetStyle(lgsGTK_Default);
|
||||
|
||||
If Style <> nil then
|
||||
Style := gtk_style_attach(gtk_style_ref(Style),aDC.Drawable);
|
||||
If Style <> nil then
|
||||
Style := gtk_style_attach(gtk_style_ref(Style),aDC.Drawable);
|
||||
end;
|
||||
|
||||
Widget := GetStyleWidget(lgsCheckbox);
|
||||
If Widget = nil then
|
||||
Widget := GetStyleWidget(lgsDefault);
|
||||
If (Widget <> nil) and (Style <> nil) then begin
|
||||
Widget^.Window := aDC.Drawable;
|
||||
if Style<>nil then
|
||||
gtk_paint_check(Style,aDC.Drawable, State,
|
||||
Shadow, nil, Widget, 'checkbutton',
|
||||
Rect.Left+DCOrigin.X,Rect.Top+DCOrigin.Y,
|
||||
Rect.Right-Rect.Left, Rect.Bottom-Rect.Top);
|
||||
gtk_paint_check(Style,aDC.Drawable, State,
|
||||
Shadow, nil, Widget, 'checkbutton',
|
||||
Rect.Left+DCOrigin.X,Rect.Top+DCOrigin.Y,
|
||||
Rect.Right-Rect.Left, Rect.Bottom-Rect.Top);
|
||||
Result := True;
|
||||
end
|
||||
else begin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user