Fix dialog being "glued" to calling form on gtk2. Fix behaviour when dialog font is not found.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8153 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
a0993874a1
commit
d95f7b808e
@ -66,7 +66,7 @@ implementation
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
LCLIntf, LCLType, InterfaceBase, TypInfo,
|
||||
LCLIntf, LCLType, InterfaceBase, TypInfo, Math,
|
||||
{$IF FPC_FullVersion >= 30202}System.{$IFEND}UITypes;
|
||||
|
||||
const
|
||||
@ -283,7 +283,7 @@ end;
|
||||
procedure TDemoForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cbFontName.Items.Assign(Screen.Fonts);
|
||||
cbFontName.ItemIndex := cbFontName.Items.IndexOf('Consolas');;
|
||||
cbFontName.ItemIndex := Max(0, cbFontName.Items.IndexOf('Liberation Sans'));
|
||||
cbFontName.Enabled := false;
|
||||
seFontSize.Enabled := false;
|
||||
lblResult.Caption := '';
|
||||
|
@ -128,7 +128,7 @@ type
|
||||
constructor TQForm.CreateNew(AOwner: TComponent; Num: Integer = 0);
|
||||
begin
|
||||
inherited;
|
||||
BorderStyle := bsDialog;
|
||||
BorderStyle := bsSingle; // In gth2, bsDialog "glues" the dialog to the calling form
|
||||
BorderIcons := [biSystemMenu];
|
||||
Color := clWindow;
|
||||
PopupMode := pmAuto;
|
||||
|
Loading…
Reference in New Issue
Block a user