High DPI:

* remove ParentFont flag from forms again (introduced in 9cdcd631454f6f9e999893ea89fcf502d994474c for #213). This just inherits from default Windows settings.
* instead, scale font size in InheritFont(), and move that to the new TExtForm class
* mark app with PerMonitorV2 support
This commit is contained in:
Ansgar Becker
2019-07-17 21:59:18 +02:00
parent 2dfb11879d
commit 92c8f62b85
50 changed files with 218 additions and 103 deletions

View File

@ -78,7 +78,6 @@ begin
Application.Initialize;
Application.Title := APPNAME;
Application.UpdateFormatSettings := False;
AppHelpers.InheritFont(Application.DefaultFont);
TStyleManager.TrySetStyle(AppSettings.ReadString(asTheme));
Application.CreateForm(TMainForm, MainForm);
MainForm.AfterFormCreate;

View File

@ -3,8 +3,9 @@
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>True/PM</dpiAware>
<asmv3:windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>

View File

@ -6,7 +6,11 @@ object AboutBox: TAboutBox
ClientHeight = 315
ClientWidth = 481
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
FormStyle = fsStayOnTop
OldCreateOrder = True
Position = poOwnerFormCenter

View File

@ -8,10 +8,10 @@ interface
uses
Windows, Classes, Graphics, Forms, Controls, StdCtrls, ExtCtrls, SysUtils, ComCtrls, pngimage, gnugettext,
Dialogs, SynRegExpr, Vcl.Menus, ClipBrd;
Dialogs, SynRegExpr, Vcl.Menus, ClipBrd, extra_controls;
type
TAboutBox = class(TForm)
TAboutBox = class(TExtForm)
btnClose: TButton;
lblAppName: TLabel;
lblAppVersion: TLabel;

View File

@ -318,7 +318,6 @@ type
function GetNextNode(Tree: TVirtualStringTree; CurrentNode: PVirtualNode; Selected: Boolean=False): PVirtualNode;
function GetPreviousNode(Tree: TVirtualStringTree; CurrentNode: PVirtualNode; Selected: Boolean=False): PVirtualNode;
function DateBackFriendlyCaption(d: TDateTime): String;
procedure InheritFont(AFont: TFont);
function GetLightness(AColor: TColor): Byte;
function ReformatSQL(SQL: String): String;
function ParamBlobToStr(lpData: Pointer): String;
@ -1751,39 +1750,6 @@ begin
end;
procedure InheritFont(AFont: TFont);
var
LogFont: TLogFont;
GUIFontName: String;
begin
// Set custom font if set, or default system font.
// In high-dpi mode, the font *size* is increased automatically somewhere in the VCL,
// caused by a form's .Scaled property. So we don't increase it here again.
// To test this, you really need to log off/on Windows!
GUIFontName := AppSettings.ReadString(asGUIFontName);
if not GUIFontName.IsEmpty then begin
// Apply user specified font
AFont.Name := GUIFontName;
// Set size on top of automatic dpi-increased size
AFont.Size := AppSettings.ReadInt(asGUIFontSize);
end else begin
// Apply system font. See issue #3204.
// Code taken from http://www.gerixsoft.com/blog/delphi/system-font
if SystemParametersInfo(SPI_GETICONTITLELOGFONT, SizeOf(TLogFont), @LogFont, 0) then begin
AFont.Height := LogFont.lfHeight;
AFont.Orientation := LogFont.lfOrientation;
AFont.Charset := TFontCharset(LogFont.lfCharSet);
AFont.Name := PChar(@LogFont.lfFaceName);
case LogFont.lfPitchAndFamily and $F of
VARIABLE_PITCH: AFont.Pitch := fpVariable;
FIXED_PITCH: AFont.Pitch := fpFixed;
else AFont.Pitch := fpDefault;
end;
end;
end;
end;
function GetLightness(AColor: TColor): Byte;
var
R, G, B: Byte;

View File

@ -9,7 +9,7 @@ uses
{$I const.inc}
type
TfrmBinEditor = class(TFormWithSizeGrip)
TfrmBinEditor = class(TExtForm)
memoText: TMemo;
tlbStandard: TToolBar;
btnWrap: TToolButton;
@ -90,6 +90,7 @@ end;
procedure TfrmBinEditor.FormCreate(Sender: TObject);
begin
TranslateComponent(Self);
AddSizeGrip;
end;

View File

@ -10,7 +10,11 @@ object frmPasswordChange: TfrmPasswordChange
Constraints.MaxWidth = 600
Constraints.MinHeight = 185
Constraints.MinWidth = 400
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnCreate = FormCreate

View File

@ -8,7 +8,7 @@ uses
Vcl.Menus, Clipbrd, Vcl.ComCtrls, System.Math;
type
TfrmPasswordChange = class(TFormWithSizeGrip)
TfrmPasswordChange = class(TExtForm)
lblHeading: TLabel;
lblPassword: TLabel;
lblRepeatPassword: TLabel;
@ -58,6 +58,7 @@ uses main, apphelpers;
procedure TfrmPasswordChange.FormCreate(Sender: TObject);
begin
TranslateComponent(Self);
AddSizeGrip;
end;

View File

@ -8,7 +8,11 @@ object ColumnSelectionForm: TColumnSelectionForm
Color = clBtnFace
Constraints.MinHeight = 150
Constraints.MinWidth = 200
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
OnClose = FormClose
OnCreate = FormCreate

View File

@ -7,7 +7,7 @@ uses
apphelpers, gnugettext, extra_controls;
type
TColumnSelectionForm = class(TFormWithSizeGrip)
TColumnSelectionForm = class(TExtForm)
btnCancel: TButton;
btnOK: TButton;
chkSelectAll: TCheckBox;
@ -46,6 +46,7 @@ uses main;
procedure TColumnSelectionForm.FormCreate(Sender: TObject);
begin
TranslateComponent(Self);
AddSizeGrip;
Width := AppSettings.ReadInt(asColumnSelectorWidth);
Height := AppSettings.ReadInt(asColumnSelectorHeight);
FCheckedColumns := TStringList.Create;

View File

@ -8,7 +8,11 @@ object connform: Tconnform
Color = clBtnFace
Constraints.MinHeight = 360
Constraints.MinWidth = 640
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
ShowHint = True
OnClose = FormClose

View File

@ -14,7 +14,7 @@ uses
dbconnection, gnugettext, SynRegExpr, System.Types, System.IOUtils, Vcl.GraphUtil;
type
Tconnform = class(TFormWithSizeGrip)
Tconnform = class(TExtForm)
btnCancel: TButton;
btnOpen: TButton;
btnSave: TButton;
@ -239,6 +239,7 @@ var
begin
// Fix GUI stuff
TranslateComponent(Self);
AddSizeGrip;
FixDropDownButtons(Self);
lblDownloadPlink.Font.Style := [fsUnderline];
lblDownloadPlink.Font.Color := clBlue;

View File

@ -7,7 +7,11 @@ object CopyTableForm: TCopyTableForm
Color = clBtnFace
Constraints.MinHeight = 340
Constraints.MinWidth = 380
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnClose = FormClose

View File

@ -8,7 +8,7 @@ uses
dbconnection, dbstructures, VirtualTrees, SynEdit, SynMemo, Menus, gnugettext;
type
TCopyTableForm = class(TFormWithSizeGrip)
TCopyTableForm = class(TExtForm)
editNewTablename: TEdit;
lblNewTablename: TLabel;
btnCancel: TButton;
@ -68,6 +68,7 @@ const
procedure TCopyTableForm.FormCreate(Sender: TObject);
begin
TranslateComponent(Self);
AddSizeGrip;
FixDropDownButtons(Self);
Width := AppSettings.ReadInt(asCopyTableWindowWidth);
Height := AppSettings.ReadInt(asCopyTableWindowHeight);

View File

@ -6,7 +6,11 @@ object CreateDatabaseForm: TCreateDatabaseForm
ClientHeight = 227
ClientWidth = 317
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poOwnerFormCenter
OnClose = FormClose

View File

@ -4,10 +4,10 @@ interface
uses
Windows, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, SynEdit, SynMemo,
dbconnection, dbstructures, gnugettext, SynRegExpr;
dbconnection, dbstructures, gnugettext, SynRegExpr, extra_controls;
type
TCreateDatabaseForm = class(TForm)
TCreateDatabaseForm = class(TExtForm)
editDBName: TEdit;
lblDBName: TLabel;
btnOK: TButton;

View File

@ -6,7 +6,11 @@ object DataSortingForm: TDataSortingForm
ClientHeight = 97
ClientWidth = 204
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
OnClose = FormClose
OnCreate = FormCreate

View File

@ -4,11 +4,11 @@ interface
uses
Windows, SysUtils, Classes, Controls, Forms, StdCtrls, ExtCtrls, ComCtrls, Buttons,
Vcl.Graphics, apphelpers, gnugettext;
Vcl.Graphics, apphelpers, gnugettext, extra_controls;
type
TDataSortingForm = class(TForm)
TDataSortingForm = class(TExtForm)
pnlBevel: TPanel;
btnOK: TButton;
btnCancel: TButton;

View File

@ -7,7 +7,11 @@ object frmEditVariable: TfrmEditVariable
Color = clBtnFace
Constraints.MinHeight = 260
Constraints.MinWidth = 200
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnCreate = FormCreate

View File

@ -10,7 +10,7 @@ type
TVarType = (vtString, vtNumeric, vtBoolean, vtEnum);
EVariableError = class(Exception);
TfrmEditVariable = class(TFormWithSizeGrip)
TfrmEditVariable = class(TExtForm)
btnOK: TButton;
btnCancel: TButton;
grpScope: TGroupBox;
@ -56,6 +56,7 @@ uses main, apphelpers;
procedure TfrmEditVariable.FormCreate(Sender: TObject);
begin
TranslateComponent(Self);
AddSizeGrip;
Width := AppSettings.ReadInt(asEditVarWindowWidth);
Height := AppSettings.ReadInt(asEditVarWindowHeight);
end;

View File

@ -8,7 +8,11 @@ object frmExportGrid: TfrmExportGrid
Color = clBtnFace
Constraints.MinHeight = 450
Constraints.MinWidth = 350
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnClose = FormClose

View File

@ -10,7 +10,7 @@ uses
type
TGridExportFormat = (efExcel, efCSV, efHTML, efXML, efSQLInsert, efSQLReplace, efSQLDeleteInsert, efLaTeX, efWiki, efPHPArray, efMarkDown, efJSON);
TfrmExportGrid = class(TFormWithSizeGrip)
TfrmExportGrid = class(TExtForm)
btnOK: TButton;
btnCancel: TButton;
grpFormat: TRadioGroup;
@ -104,6 +104,7 @@ var
FormatDesc: String;
begin
TranslateComponent(Self);
AddSizeGrip;
Width := AppSettings.ReadInt(asGridExportWindowWidth);
Height := AppSettings.ReadInt(asGridExportWindowHeight);
editFilename.Text := AppSettings.ReadString(asGridExportFilename);

View File

@ -4,15 +4,15 @@ interface
uses
Classes, SysUtils, Forms, Windows, Messages, System.Types, StdCtrls, Clipbrd,
SizeGrip, SizeGripThemed;
SizeGrip, SizeGripThemed, apphelpers, Vcl.Graphics;
type
// Form with a sizegrip in the lower right corner, without the need for a statusbar
TFormWithSizeGrip = class(TForm)
private
FGripper: TSizeGripThemed;
TExtForm = class(TForm)
public
constructor Create(AOwner: TComponent); override;
procedure AddSizeGrip;
class procedure InheritFont(AFont: TFont; Form: TForm);
end;
// Memo replacement which accepts any line break format
TLineNormalizingMemo = class(TMemo)
@ -25,11 +25,18 @@ type
implementation
{ TFormWithSizeGrip }
{ TExtForm }
constructor TFormWithSizeGrip.Create(AOwner: TComponent);
constructor TExtForm.Create(AOwner: TComponent);
begin
inherited;
InheritFont(Font, Self);
end;
procedure TExtForm.AddSizeGrip;
var
FGripper: TSizeGripThemed;
begin
FGripper := TSizeGripThemed.Create(Self);
FGripper.Themed := True;
FGripper.Enabled := True;
@ -37,6 +44,41 @@ begin
end;
class procedure TExtForm.InheritFont(AFont: TFont; Form: TForm);
var
LogFont: TLogFont;
GUIFontName: String;
begin
// Set custom font if set, or default system font.
// In high-dpi mode, the font *size* is increased automatically somewhere in the VCL,
// caused by a form's .Scaled property. So we don't increase it here again.
// To test this, you really need to log off/on Windows!
GUIFontName := AppSettings.ReadString(asGUIFontName);
if not GUIFontName.IsEmpty then begin
// Apply user specified font
AFont.Name := GUIFontName;
// Set size on top of automatic dpi-increased size
AFont.Size := Round(AppSettings.ReadInt(asGUIFontSize) * DpiScaleFactor(Form));
end else begin
// Apply system font. See issue #3204.
// Code taken from http://www.gerixsoft.com/blog/delphi/system-font
if SystemParametersInfo(SPI_GETICONTITLELOGFONT, SizeOf(TLogFont), @LogFont, 0) then begin
AFont.Height := Round(LogFont.lfHeight * DpiScaleFactor(Form));
AFont.Orientation := LogFont.lfOrientation;
AFont.Charset := TFontCharset(LogFont.lfCharSet);
AFont.Name := PChar(@LogFont.lfFaceName);
case LogFont.lfPitchAndFamily and $F of
VARIABLE_PITCH: AFont.Pitch := fpVariable;
FIXED_PITCH: AFont.Pitch := fpFixed;
else AFont.Pitch := fpDefault;
end;
end else begin
ErrorDialog('Could not detect system font, using SystemParametersInfo.');
end;
end;
end;
{ TLineNormalizingMemo }

View File

@ -8,7 +8,11 @@ object frmInsertFiles: TfrmInsertFiles
Color = clBtnFace
Constraints.MinHeight = 353
Constraints.MinWidth = 475
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poOwnerFormCenter
OnClose = FormClose

View File

@ -25,7 +25,7 @@ type
end;
PFileInfo = ^TFileInfo;
TfrmInsertFiles = class(TFormWithSizeGrip)
TfrmInsertFiles = class(TExtForm)
btnInsert: TButton;
btnCancel: TButton;
OpenDialog: TOpenDialog;
@ -117,6 +117,7 @@ const
procedure TfrmInsertFiles.FormCreate(Sender: TObject);
begin
TranslateComponent(Self);
AddSizeGrip;
ListFiles.Images := GetSystemImageList;
DragAcceptFiles(Handle, True);
MainForm.RestoreListSetup(ListColumns);

View File

@ -7,7 +7,11 @@ object loaddataform: Tloaddataform
Color = clBtnFace
Constraints.MinHeight = 530
Constraints.MinWidth = 525
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnClose = FormClose

View File

@ -14,7 +14,7 @@ uses
dbconnection, dbstructures, gnugettext;
type
Tloaddataform = class(TFormWithSizeGrip)
Tloaddataform = class(TExtForm)
btnImport: TButton;
btnCancel: TButton;
lblDatabase: TLabel;
@ -94,6 +94,7 @@ const
procedure Tloaddataform.FormCreate(Sender: TObject);
begin
TranslateComponent(Self);
AddSizeGrip;
// Restore settings
Width := AppSettings.ReadInt(asCSVImportWindowWidth);
Height := AppSettings.ReadInt(asCSVImportWindowHeight);

View File

@ -6,7 +6,11 @@ object frmLogin: TfrmLogin
ClientHeight = 176
ClientWidth = 270
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
@ -26,8 +30,6 @@ object frmLogin: TfrmLogin
Default = True
ModalResult = 1
TabOrder = 1
ExplicitLeft = 160
ExplicitTop = 104
end
object pnlBackground: TPanel
Left = 0
@ -42,8 +44,6 @@ object frmLogin: TfrmLogin
ParentBackground = False
ShowCaption = False
TabOrder = 0
ExplicitWidth = 266
ExplicitHeight = 98
DesignSize = (
270
137)
@ -96,7 +96,6 @@ object frmLogin: TfrmLogin
Anchors = [akLeft, akRight, akBottom]
TabOrder = 0
Text = 'editUsername'
ExplicitWidth = 268
end
end
end

View File

@ -4,7 +4,11 @@ object MainForm: TMainForm
ClientHeight = 466
ClientWidth = 977
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Menu = MainMenu1
OldCreateOrder = True
Position = poDesigned

View File

@ -19,7 +19,7 @@ uses
insertfiles, searchreplace, loaddata, copytable, VirtualTrees.HeaderPopup, Cromis.DirectoryWatch, SyncDB, gnugettext,
JumpList, System.Actions, System.UITypes, pngimage,
System.ImageList, Vcl.Styles.UxTheme, Vcl.Styles.Utils.Menus, Vcl.Styles.Utils.Forms,
Vcl.VirtualImageList, Vcl.BaseImageCollection, Vcl.ImageCollection, System.IniFiles;
Vcl.VirtualImageList, Vcl.BaseImageCollection, Vcl.ImageCollection, System.IniFiles, extra_controls;
type
@ -154,7 +154,7 @@ type
function SetThumbnailClip(hwnd: HWND; var prcClip: TRect): HRESULT; stdcall;
end;
TMainForm = class(TForm)
TMainForm = class(TExtForm)
MainMenu1: TMainMenu;
MainMenuFile: TMenuItem;
FileNewItem: TMenuItem;
@ -1830,7 +1830,7 @@ begin
Delimiter := AppSettings.ReadString(asDelimiter);
InheritFont(SynCompletionProposal.Font);
InheritFont(SynCompletionProposal.Font, Self);
// Simulated link label, has non inherited blue font color
lblExplainProcess.Font.Color := clBlue;
lblExplainProcessAnalyzer.Font.Color := clBlue;
@ -1849,7 +1849,7 @@ begin
QueryTab.spltHelpers := spltQueryHelpers;
QueryTab.spltQuery := spltQuery;
QueryTab.tabsetQuery := tabsetQuery;
InheritFont(QueryTab.tabsetQuery.Font);
InheritFont(QueryTab.tabsetQuery.Font, Self);
QueryTab.ResultTabs := TResultTabs.Create(True);
QueryTabs := TObjectList<TQueryTab>.Create(True);
@ -2041,6 +2041,7 @@ begin
LogSQL(f_('Theme: "%s"', [TStyleManager.ActiveStyle.Name]), lcDebug);
LogSQL(f_('Pixels per inch on current monitor: %d', [Monitor.PixelsPerInch]), lcDebug);
// Now we are free to use certain methods, which are otherwise fired too early
MainFormCreated := True;
end;
@ -5005,6 +5006,8 @@ var
Sess, OldSettingsPath: String;
LogIt: Boolean;
begin
if not MainFormCreated then
Exit;
if csDestroying in ComponentState then
Exit;
@ -10749,7 +10752,7 @@ begin
// Prevent various problems with alignment of controls. See http://www.heidisql.com/forum.php?t=18924
QueryTab.tabsetQuery.Top := QueryTab.spltQuery.Top + QueryTab.spltQuery.Height;
QueryTab.tabsetQuery.Align := tabsetQuery.Align;
InheritFont(QueryTab.tabsetQuery.Font);
InheritFont(QueryTab.tabsetQuery.Font, Self);
QueryTab.tabsetQuery.Images := tabsetQuery.Images;
QueryTab.tabsetQuery.Style := tabsetQuery.Style;
QueryTab.tabsetQuery.TabHeight := tabsetQuery.TabHeight;

View File

@ -8,7 +8,11 @@ object optionsform: Toptionsform
Color = clBtnFace
Constraints.MinHeight = 480
Constraints.MinWidth = 600
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnClose = FormClose

View File

@ -31,7 +31,7 @@ type
end;
TGridColorsPresetList = TObjectList<TGridColorsPreset>;
Toptionsform = class(TFormWithSizeGrip)
Toptionsform = class(TExtForm)
pagecontrolMain: TPageControl;
tabMisc: TTabSheet;
btnCancel: TButton;
@ -484,6 +484,7 @@ var
IconPack: String;
begin
TranslateComponent(Self);
AddSizeGrip;
Width := AppSettings.ReadInt(asPreferencesWindowWidth);
Height := AppSettings.ReadInt(asPreferencesWindowHeight);

View File

@ -6,7 +6,11 @@ object printlistForm: TprintlistForm
ClientHeight = 92
ClientWidth = 377
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnCreate = FormCreate

View File

@ -8,7 +8,11 @@ object frmSearchReplace: TfrmSearchReplace
Color = clBtnFace
Constraints.MinHeight = 320
Constraints.MinWidth = 400
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poOwnerFormCenter
OnCreate = FormCreate

View File

@ -8,7 +8,7 @@ uses
SynEditRegexSearch, SynEditMiscClasses, SynEditSearch, extra_controls;
type
TfrmSearchReplace = class(TFormWithSizeGrip)
TfrmSearchReplace = class(TExtForm)
btnCancel: TButton;
btnReplaceAll: TButton;
lblSearch: TLabel;
@ -60,6 +60,7 @@ uses apphelpers, main;
procedure TfrmSearchReplace.FormCreate(Sender: TObject);
begin
TranslateComponent(Self);
AddSizeGrip;
comboSearch.Items.Text := AppSettings.ReadString(asFindDialogSearchHistory);
comboReplace.Items.Text := AppSettings.ReadString(asFindDialogReplaceHistory);
comboSearch.Text := '';

View File

@ -7,7 +7,11 @@ object frmSelectDBObject: TfrmSelectDBObject
Color = clBtnFace
Constraints.MinHeight = 250
Constraints.MinWidth = 200
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poOwnerFormCenter
OnCreate = FormCreate

View File

@ -7,7 +7,7 @@ uses
dbconnection, gnugettext;
type
TfrmSelectDBObject = class(TFormWithSizeGrip)
TfrmSelectDBObject = class(TExtForm)
TreeDBO: TVirtualStringTree;
btnOK: TButton;
btnCancel: TButton;
@ -63,6 +63,7 @@ end;
procedure TfrmSelectDBObject.FormCreate(Sender: TObject);
begin
TranslateComponent(Self);
AddSizeGrip;
Width := AppSettings.ReadInt(asSelectDBOWindowWidth);
Height := AppSettings.ReadInt(asSelectDBOWindowHeight);
TreeDBO.TreeOptions := MainForm.DBtree.TreeOptions;

View File

@ -5,7 +5,11 @@ object frmSQLhelp: TfrmSQLhelp
ClientHeight = 355
ClientWidth = 582
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
FormStyle = fsStayOnTop
OldCreateOrder = False
OnClose = FormClose

View File

@ -9,7 +9,7 @@ uses
dbconnection, gnugettext;
type
TfrmSQLhelp = class(TFormWithSizeGrip)
TfrmSQLhelp = class(TExtForm)
URIOpenerDescription: TSynURIOpener;
URIHighlighter: TSynURISyn;
URIOpenerExample: TSynURIOpener;
@ -94,6 +94,7 @@ begin
Caption := DEFAULT_WINDOW_CAPTION;
FixVT(treeTopics);
TranslateComponent(Self);
AddSizeGrip;
treeTopics.Clear;
FreeAndNil(FRootTopics);

View File

@ -7,7 +7,11 @@ object frmSyncDB: TfrmSyncDB
Color = clBtnFace
Constraints.MinHeight = 400
Constraints.MinWidth = 550
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnClose = FormClose

View File

@ -8,7 +8,7 @@ uses
dbconnection, gnugettext;
type
TfrmSyncDB = class(TFormWithSizeGrip)
TfrmSyncDB = class(TExtForm)
treeSource: TVirtualStringTree;
lblSource: TLabel;
grpTarget: TGroupBox;
@ -108,6 +108,7 @@ var
begin
Caption := MainForm.actSynchronizeDatabase.Caption;
TranslateComponent(Self);
AddSizeGrip;
FixVT(treeSource);
FixVT(treeDifferences);

View File

@ -6,7 +6,11 @@ object frmTableTools: TfrmTableTools
ClientHeight = 383
ClientWidth = 764
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnClose = FormClose

View File

@ -15,7 +15,7 @@ uses
type
TToolMode = (tmMaintenance, tmFind, tmSQLExport, tmBulkTableEdit);
TfrmTableTools = class(TFormWithSizeGrip)
TfrmTableTools = class(TExtForm)
btnCloseOrCancel: TButton;
pnlTop: TPanel;
TreeObjects: TVirtualStringTree;
@ -226,6 +226,7 @@ var
Obj: TDBObject;
begin
TranslateComponent(Self);
AddSizeGrip;
FixDropDownButtons(Self);
OUTPUT_FILE := _('Single .sql file');
OUTPUT_FILE_COMPRESSED := _('ZIP compressed .sql file');

View File

@ -7,7 +7,11 @@ object frmTextEditor: TfrmTextEditor
Color = clBtnFace
Constraints.MinHeight = 100
Constraints.MinWidth = 130
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnClose = FormClose

View File

@ -11,7 +11,7 @@ uses
{$I const.inc}
type
TfrmTextEditor = class(TFormWithSizeGrip)
TfrmTextEditor = class(TExtForm)
Panel1: TPanel;
tlbStandard: TToolBar;
btnWrap: TToolButton;
@ -185,6 +185,7 @@ end;
procedure TfrmTextEditor.FormCreate(Sender: TObject);
begin
AddSizeGrip;
FmemoText := TLineNormalizingMemo.Create(Self);
FmemoText.Parent := Self;
FmemoText.Align := alClient;

View File

@ -5,10 +5,10 @@ interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.StdCtrls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, apphelpers,
Vcl.ComCtrls, Vcl.GraphUtil, Vcl.Imaging.pngimage;
Vcl.ComCtrls, Vcl.GraphUtil, Vcl.Imaging.pngimage, extra_controls;
type
TfrmThemePreview = class(TForm)
TfrmThemePreview = class(TExtForm)
StatusBarMain: TStatusBar;
ScrollBoxImage: TScrollBox;
imagePreview: TImage;

View File

@ -6,7 +6,11 @@ object frmUpdateCheck: TfrmUpdateCheck
ClientHeight = 425
ClientWidth = 384
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnCreate = FormCreate

View File

@ -4,10 +4,10 @@ interface
uses
Windows, Messages, SysUtils, Classes, Forms, StdCtrls, IniFiles, Controls, Graphics,
apphelpers, gnugettext, ExtCtrls;
apphelpers, gnugettext, ExtCtrls, extra_controls;
type
TfrmUpdateCheck = class(TForm)
TfrmUpdateCheck = class(TExtForm)
btnCancel: TButton;
groupBuild: TGroupBox;
btnBuild: TButton;

View File

@ -8,7 +8,11 @@ object UserManagerForm: TUserManagerForm
Color = clBtnFace
Constraints.MinHeight = 350
Constraints.MinWidth = 450
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnClose = FormClose

View File

@ -40,7 +40,7 @@ type
EInputError = class(Exception);
TUserManagerForm = class(TFormWithSizeGrip)
TUserManagerForm = class(TExtForm)
btnCancel: TButton;
btnSave: TButton;
pnlLeft: TPanel;
@ -215,6 +215,7 @@ begin
FixVT(treePrivs);
Mainform.RestoreListSetup(listUsers);
TranslateComponent(Self);
AddSizeGrip;
PrivsRead := Explode(',', 'SELECT,SHOW VIEW,SHOW DATABASES,PROCESS,EXECUTE');
PrivsWrite := Explode(',', 'ALTER,CREATE,DROP,DELETE,UPDATE,INSERT,ALTER ROUTINE,CREATE ROUTINE,CREATE TEMPORARY TABLES,CREATE VIEW,INDEX,TRIGGER,EVENT,REFERENCES,CREATE TABLESPACE');
PrivsAdmin := Explode(',', 'RELOAD,SHUTDOWN,REPLICATION CLIENT,REPLICATION SLAVE,SUPER,LOCK TABLES,GRANT,FILE,CREATE USER');