diff options
author | Graeme Geldenhuys <graemeg@users.sourceforge.net> | 2007-04-09 11:26:26 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@users.sourceforge.net> | 2007-04-09 11:26:26 +0000 |
commit | 453397a4c94c62549b2cfa0aff24faf011fac246 (patch) | |
tree | 1871e227b5a59de0134b69b4bde5dd213dc455cd | |
parent | 5720b4c6f5fd3c3e55ea2f531b9a0d6cdce662fe (diff) | |
download | fpGUI-453397a4c94c62549b2cfa0aff24faf011fac246.tar.xz |
Removed the inline functions in fpgui.pas which solved the problem with FPC wanting to recomile that unit when not really needed. Most of the times it reported that StyleManager.pas could not be found.
-rw-r--r-- | gui/fpgui.pas | 25 | ||||
-rw-r--r-- | gui/fpguipackage.lpk | 17 | ||||
-rw-r--r-- | gui/fpguipackage.pas | 2 | ||||
-rw-r--r-- | gui/fpguiscrollbar.inc | 12 |
4 files changed, 15 insertions, 41 deletions
diff --git a/gui/fpgui.pas b/gui/fpgui.pas index d4b1de66..cac0c8cc 100644 --- a/gui/fpgui.pas +++ b/gui/fpgui.pas @@ -147,9 +147,7 @@ type {$I fpguiprogressbar.inc} -function Min(a, b: Integer): Integer; inline; -function Max(a, b: Integer): Integer; inline; -function ClipMinMax(val, min, max: Integer): Integer; inline; +function ClipMinMax(val, min, max: Integer): Integer; //inline; { This will change at a later date! } procedure LoadForm(AForm: TComponent); @@ -159,9 +157,6 @@ implementation uses Math ,StyleManager -// ,MotifStyle // so they register with style manager -// ,OpenSoftStyle // so they register with style manager -// ,WindowsStyle // so they register with style manager ; @@ -175,24 +170,6 @@ var {$ENDIF} -function Min(a, b: Integer): Integer; -begin - if a < b then - Result := a - else - Result := b; -end; - - -function Max(a, b: Integer): Integer; -begin - if a > b then - Result := a - else - Result := b; -end; - - function ClipMinMax(val, min, max: Integer): Integer; begin if val < min then diff --git a/gui/fpguipackage.lpk b/gui/fpguipackage.lpk index 36dd8cf8..1213b9a4 100644 --- a/gui/fpguipackage.lpk +++ b/gui/fpguipackage.lpk @@ -1,14 +1,12 @@ <?xml version="1.0"?> <CONFIG> <Package Version="2"> - <PathDelim Value="\"/> <Name Value="fpguipackage"/> <Author Value="Graeme Geldenhuys"/> <CompilerOptions> <Version Value="5"/> - <PathDelim Value="\"/> <SearchPaths> - <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> + <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> </SearchPaths> <Parsing> <SyntaxOptions> @@ -31,12 +29,12 @@ <Version Minor="3"/> <Files Count="5"> <Item1> - <Filename Value="stylemanager.pas"/> - <UnitName Value="StyleManager"/> - </Item1> - <Item2> <Filename Value="fpgui.pas"/> <UnitName Value="fpGUI"/> + </Item1> + <Item2> + <Filename Value="stylemanager.pas"/> + <UnitName Value="StyleManager"/> </Item2> <Item3> <Filename Value="windowsstyle.pas"/> @@ -51,7 +49,7 @@ <UnitName Value="OpenSoftStyle"/> </Item5> </Files> - <LazDoc Paths="..\docs\xml\gui\"/> + <LazDoc Paths="../docs/xml/gui/"/> <RequiredPkgs Count="2"> <Item1> <PackageName Value="fpgfxpackage"/> @@ -63,11 +61,10 @@ </Item2> </RequiredPkgs> <UsageOptions> - <UnitPath Value="$(PkgOutDir)\"/> + <UnitPath Value="$(PkgOutDir)/"/> </UsageOptions> <PublishOptions> <Version Value="2"/> - <DestinationDirectory Value="$(TestDir)\publishedpackage\"/> <IgnoreBinaries Value="False"/> </PublishOptions> </Package> diff --git a/gui/fpguipackage.pas b/gui/fpguipackage.pas index 798191c8..2e601325 100644 --- a/gui/fpguipackage.pas +++ b/gui/fpguipackage.pas @@ -7,7 +7,7 @@ unit fpguipackage; interface uses - StyleManager, fpGUI, WindowsStyle, MotifStyle, OpenSoftStyle; + fpGUI, StyleManager, WindowsStyle, MotifStyle, OpenSoftStyle; implementation diff --git a/gui/fpguiscrollbar.inc b/gui/fpguiscrollbar.inc index 38b55384..43030960 100644 --- a/gui/fpguiscrollbar.inc +++ b/gui/fpguiscrollbar.inc @@ -537,10 +537,10 @@ begin begin Inc(FMinSize.cx, Left + Right); Inc(FMinSize.cy, Top + Bottom); - FDefSize.cx := fpGUI.Min(DefSize.cx + Left + Right, InfiniteSize); - FDefSize.cy := fpGUI.Min(DefSize.cy + Top + Bottom, InfiniteSize); - FMaxSize.cx := fpGUI.Min(MaxSize.cx + Left + Right, InfiniteSize); - FMaxSize.cy := fpGUI.Min(MaxSize.cy + Top + Bottom, InfiniteSize); + FDefSize.cx := Math.Min(DefSize.cx + Left + Right, InfiniteSize); + FDefSize.cy := Math.Min(DefSize.cy + Top + Bottom, InfiniteSize); + FMaxSize.cx := Math.Min(MaxSize.cx + Left + Right, InfiniteSize); + FMaxSize.cy := Math.Min(MaxSize.cy + Top + Bottom, InfiniteSize); end; end; @@ -684,8 +684,8 @@ begin Size := Slider.Width else Size := Slider.Height; - Result := fpGUI.Max(Style.GeTFScrollBarBtnMinSize, - PageSize * Size div fpGUI.Max(1, Max - Min + 1)); + Result := Math.Max(Style.GeTFScrollBarBtnMinSize, + PageSize * Size div Math.Max(1, Max - Min + 1)); if Result > Size then Result := Size; end; |