summaryrefslogtreecommitdiff
path: root/examples/apps/uidesigner
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-20 12:06:24 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-20 12:06:24 +0000
commit0e49b0dfcd4143988b7c5cd6094f821b709e36bd (patch)
tree2a3874116cdaf2f539d79d8c504009e3eb907d79 /examples/apps/uidesigner
parent1f7bbc75ab6a277868fe9ef7594e015db6295a45 (diff)
downloadfpGUI-0e49b0dfcd4143988b7c5cd6094f821b709e36bd.tar.xz
* Finally fixed the Windows bug in the UI Designer when you move components quickly in the design form. * Undone some changes I accidentily checked in in revision 634 regarding the newformdesigner.pas unit.
Diffstat (limited to 'examples/apps/uidesigner')
-rw-r--r--examples/apps/uidesigner/newformdesigner.pas43
1 files changed, 4 insertions, 39 deletions
diff --git a/examples/apps/uidesigner/newformdesigner.pas b/examples/apps/uidesigner/newformdesigner.pas
index f9a111e8..429556fc 100644
--- a/examples/apps/uidesigner/newformdesigner.pas
+++ b/examples/apps/uidesigner/newformdesigner.pas
@@ -145,8 +145,6 @@ type
TfrmAbout = class(TfpgForm)
- private
- procedure ApplyScreenRatio;
public
{@VFD_HEAD_BEGIN: frmAbout}
lblName1: TfpgLabel;
@@ -183,37 +181,7 @@ uses
{@VFD_NEWFORM_IMPL}
-procedure TfrmAbout.ApplyScreenRatio;
-var
- i: integer;
- wg: TfpgWidget;
- ratio: double;
-begin
-// writeln('dpi = ', fpgApplication.Screen_dpi);
- // Form was designed at 96 dpi.
- ratio := 96 / fpgApplication.Screen_dpi;
- for i := 0 to ComponentCount-1 do
- begin
- if Components[i] is TfpgWidget then
- begin
- wg := TfpgWidget(Components[i]);
- wg.Top := round(wg.Top * ratio);
- wg.Left := round(wg.Left * ratio);
- wg.Width := round(wg.Width * ratio);
- wg.Height := round(wg.Height * ratio);
- end;
- end;
-end;
-
procedure TfrmAbout.AfterCreate;
- function FontRatio(ASize: integer): string;
- begin
- Result := Format('%d', [round(ASize*((96/fpgApplication.Screen_dpi)-0.1))]);
- if StrToInt(Result) <= 6 then // sanity check
- Result := '8';
- writeln('Old:', ASize, ' New:', Result);
- end;
-
begin
{@VFD_BODY_BEGIN: frmAbout}
Name := 'frmAbout';
@@ -228,8 +196,7 @@ begin
Name := 'lblName1';
SetPosition(12, 16, 255, 31);
Text := 'fpGUI UI Designer';
- FontDesc := 'Arial-' + FontRatio(20);
- backgroundcolor := clGreen;
+ FontDesc := 'Arial-20';
end;
lblVersion := TfpgLabel.Create(self);
@@ -259,7 +226,7 @@ begin
Name := 'lblName3';
SetPosition(12, 100, 241, 14);
Text := 'Written by Graeme Geldenhuys';
- FontDesc := 'Arial-' + FontRatio(9);
+ FontDesc := 'Arial-9';
end;
lblName4 := TfpgLabel.Create(self);
@@ -268,7 +235,7 @@ begin
Name := 'lblName4';
SetPosition(12, 116, 246, 14);
Text := 'http://opensoft.homeip.net/fpgui/';
- FontDesc := 'Arial-' + FontRatio(9) + ':underline';
+ FontDesc := 'Arial-9:underline';
end;
lblCompiled := TfpgLabel.Create(self);
@@ -277,12 +244,10 @@ begin
Name := 'lblCompiled';
SetPosition(12, 132, 191, 13);
Text := 'Compiled on: %s';
- FontDesc := 'Arial-' + FontRatio(8);
+ FontDesc := 'Arial-8';
end;
{@VFD_BODY_END: frmAbout}
-
- ApplyScreenRatio;
end;
class procedure TfrmAbout.Execute;