Fix increasing height of upper table editor area on each table click. Closes #405. Also fix double-scaled controls on routine editor.

This commit is contained in:
Ansgar Becker
2018-11-25 14:46:04 +01:00
parent 665dacdc59
commit aeba457257
3 changed files with 2 additions and 13 deletions

View File

@@ -140,7 +140,7 @@ type
asDataPreviewHeight, asDataPreviewEnabled, asLogHeight, asQueryhelperswidth, asStopOnErrorsInBatchMode,
asWrapLongLines, asDisplayBLOBsAsText, asSingleQueries, asMemoEditorWidth, asMemoEditorHeight, asMemoEditorMaximized,
asMemoEditorWrap, asDelimiter, asSQLHelpWindowLeft, asSQLHelpWindowTop, asSQLHelpWindowWidth,
asSQLHelpWindowHeight, asSQLHelpPnlLeftWidth, asSQLHelpPnlRightTopHeight, asTableEditorTabsHeight, asHost,
asSQLHelpWindowHeight, asSQLHelpPnlLeftWidth, asSQLHelpPnlRightTopHeight, asHost,
asUser, asPassword, asWindowsAuth, asLoginPrompt, asPort,
asPlinkExecutable, asSSHtunnelHost, asSSHtunnelHostPort, asSSHtunnelPort, asSSHtunnelUser,
asSSHtunnelPassword, asSSHtunnelTimeout, asSSHtunnelPrivateKey, asSSLActive, asSSLKey,
@@ -3579,7 +3579,6 @@ begin
InitSetting(asSQLHelpWindowHeight, 'SQLHelp_WindowHeight', 400);
InitSetting(asSQLHelpPnlLeftWidth, 'SQLHelp_PnlLeftWidth', 150);
InitSetting(asSQLHelpPnlRightTopHeight, 'SQLHelp_PnlRightTopHeight', 150);
InitSetting(asTableEditorTabsHeight, 'TableEditorTabsHeight', 150);
InitSetting(asHost, 'Host', 0, False, '127.0.0.1', True);
InitSetting(asUser, 'User', 0, False, 'root', True);
InitSetting(asPassword, 'Password', 0, False, '', True);

View File

@@ -45,7 +45,7 @@ type
btnMoveDownParam: TToolButton;
lblDisabledWhy: TLabel;
spltTop: TSplitter;
pnlDpiHelperOptions: TPanel;
pnlDpiHelperOptions: TPanel;
procedure comboTypeSelect(Sender: TObject);
procedure btnSaveClick(Sender: TObject);
procedure btnHelpClick(Sender: TObject);
@@ -105,7 +105,6 @@ constructor TfrmRoutineEditor.Create(AOwner: TComponent);
begin
inherited;
TranslateComponent(Self);
ScaleControls(Screen.PixelsPerInch, FORMS_DPI);
// Combo items in a .dfm are sporadically lost after an IDE restart,
// so we set them here to avoid developer annoyance
comboType.Items.Add(_('Procedure (doesn''t return a result)'));

View File

@@ -211,7 +211,6 @@ constructor TfrmTableEditor.Create(AOwner: TComponent);
begin
inherited;
TranslateComponent(Self);
PageControlMain.Height := AppSettings.ReadInt(asTableEditorTabsHeight);
FixVT(listColumns);
FixVT(treeIndexes);
FixVT(listForeignKeys);
@@ -237,7 +236,6 @@ end;
destructor TfrmTableEditor.Destroy;
begin
// Store GUI setup
AppSettings.WriteInt(asTableEditorTabsHeight, PageControlMain.Height);
Mainform.SaveListSetup(listColumns);
Mainform.SaveListSetup(treeIndexes);
Mainform.SaveListSetup(listForeignKeys);
@@ -252,13 +250,6 @@ var
begin
inherited;
// Auto-fix high-DPI glitch:
if Self.Height > MainForm.tabEditor.Height then begin
MainForm.LogSQL('Fixing height...', lcDebug);
PageControlMain.Height := Round(MainForm.tabEditor.Height / 2 - 50);
Self.Height := MainForm.tabEditor.Height;
end;
FLoaded := False;
comboEngine.Items := DBObject.Connection.TableEngines;
comboEngine.Items.Insert(0, '<'+_('Server default')+'>');