diff options
author | Graeme Geldenhuys <graemeg@users.sourceforge.net> | 2007-03-08 14:47:04 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@users.sourceforge.net> | 2007-03-08 14:47:04 +0000 |
commit | 41c63d039e88f4aa3e2bc74d28f0e4b892ac0fe1 (patch) | |
tree | 1d65306fdff90b1e82d3538a82a976dcf2cef1ff /gui/form.inc | |
parent | 6615b82afe97f92af4d1c0f7fb2e6b82b44c7ace (diff) | |
download | fpGUI-41c63d039e88f4aa3e2bc74d28f0e4b892ac0fe1.tar.xz |
* Reworked the Style Manager to behave like a factory pattern.
* New and custom styles can now register themselves with the gStyleManager
* I've split all the concrete styles into seperate units.
* I've rename the TStyle to TStyleAbs which more clearly shows what it is.
* Renamed TDefaultStyle to TBasicStyle to show that it it implements the basic drawing routines for a style and is recommended for custom styles to descend from.
Diffstat (limited to 'gui/form.inc')
-rw-r--r-- | gui/form.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gui/form.inc b/gui/form.inc index 3eb1ae0a..7193db44 100644 --- a/gui/form.inc +++ b/gui/form.inc @@ -115,6 +115,9 @@ constructor TCustomForm.Create(AOwner: TComponent); begin + if not Assigned(FStyle) then + FStyle := gStyleManager.DefaultStyle; + inherited Create(AOwner); FCanExpandWidth := True; @@ -122,8 +125,6 @@ begin FCursor := crArrow; FWindowOptions := [woWindow]; - if not Assigned(FStyle) then - FStyle := gStyleManager.DefaultStyle; end; |