summaryrefslogtreecommitdiff
path: root/examples/gui/widgetdemo/WidgetDemo.lpr
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gui/widgetdemo/WidgetDemo.lpr')
-rw-r--r--examples/gui/widgetdemo/WidgetDemo.lpr22
1 files changed, 14 insertions, 8 deletions
diff --git a/examples/gui/widgetdemo/WidgetDemo.lpr b/examples/gui/widgetdemo/WidgetDemo.lpr
index 391a412f..78ffc4df 100644
--- a/examples/gui/widgetdemo/WidgetDemo.lpr
+++ b/examples/gui/widgetdemo/WidgetDemo.lpr
@@ -8,9 +8,10 @@ uses
{$ENDIF}{$ENDIF}
Classes
,SysUtils
- ,fpgui
,OpenSoftStyle
- ,gfxbase
+ ,fpgui
+ ,fpgfx
+ ,stylemanager
;
type
@@ -98,7 +99,7 @@ begin
exit //==>
else
begin
- Style := TOpenSoftStyle.Create(Application.Display);
+ Style := gOpenSoftStyle;
Redraw;
end;
end
@@ -108,7 +109,7 @@ begin
exit //==>
else
begin
- Style := Application.DefaultStyle;
+ Style := gStyleManager.DefaultStyle;
Redraw;
end;
end;
@@ -352,9 +353,14 @@ var
WidgetDemoForm: TWidgetDemoForm;
begin
- WidgetDemoForm := TWidgetDemoForm.Create(nil);
- Application.AddForm(WidgetDemoForm);
- Application.Run;
- WidgetDemoForm.Free;
+ GFApplication.Initialize;
+
+ WidgetDemoForm := TWidgetDemoForm.Create(GFApplication);
+ try
+ WidgetDemoForm.Show;
+ GFApplication.Run;
+ finally
+ WidgetDemoForm.Free;
+ end;
end.