summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-12-11 14:00:07 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-12-11 14:00:07 +0000
commit0b4c2973e23e04ad6c46f403fbb149485c128c9c (patch)
tree78317828b9fb145b7fe54501ad7fecf2095640df /src/gui
parent4b4a2c266b7dd8f9e2cfac06f3009942f3b05dd0 (diff)
downloadfpGUI-0b4c2973e23e04ad6c46f403fbb149485c128c9c.tar.xz
* Fixed TfpgApplication to call CheckSynchronize in the application loop so multithreaded applications will work.
* TfpgApplication now inherits from TComponent so it can act as a container for other components like Forms. * Implemented CreateForm in TfpgApplication. * Fixed the default Height of TfpgComboBox to look at the specified Font instead of a hardcoded value.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui_combobox.pas4
-rw-r--r--src/gui/gui_form.pas1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/gui_combobox.pas b/src/gui/gui_combobox.pas
index 91e422fb..930bd551 100644
--- a/src/gui/gui_combobox.pas
+++ b/src/gui/gui_combobox.pas
@@ -465,16 +465,16 @@ end;
constructor TfpgAbstractComboBox.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
+ FFont := fpgGetFont('#List');
FBackgroundColor := clBoxColor;
FDropDownCount := 8;
FWidth := 120;
- FHeight := 23;
+ FHeight := FFont.Height + 6;
FFocusItem := 0; // nothing is selected
FMargin := 3;
FFocusable := True;
FBtnPressed := False;
- FFont := fpgGetFont('#List');
FItems := TStringList.Create;
CalculateInternalButtonRect;
diff --git a/src/gui/gui_form.pas b/src/gui/gui_form.pas
index 8c1dd83d..5b5ca64c 100644
--- a/src/gui/gui_form.pas
+++ b/src/gui/gui_form.pas
@@ -318,6 +318,7 @@ end;
procedure TfpgForm.Close;
begin
+ fpgApplication.RemoveComponent(self);
Hide;
if fpgApplication.MainForm = self then
fpgApplication.Terminated := True;