Permalink
Browse files

Issue #213 and issue #380: auto-fix high DPI glitch in table designer

  • Loading branch information...
ansgarbecker committed Nov 3, 2018
1 parent a4e041a commit f995110ad1e6dfbf2dc506a649a2ce147cb7290f
Showing with 10 additions and 2 deletions.
  1. +10 −2 source/table_editor.pas
@@ -87,8 +87,8 @@ TfrmTableEditor = class(TFrame)
menuPasteColumns: TMenuItem;
tabPartitions: TTabSheet;
SynMemoPartitions: TSynMemo;
pnlDpiHelperBasic: TPanel;
pnlDpiHelperOptions: TPanel;
pnlDpiHelperBasic: TPanel;
pnlDpiHelperOptions: TPanel;
procedure Modification(Sender: TObject);
procedure btnAddColumnClick(Sender: TObject);
procedure btnRemoveColumnClick(Sender: TObject);
@@ -251,6 +251,14 @@ procedure TfrmTableEditor.Init(Obj: TDBObject);
rx: TRegExpr;
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')+'>');

0 comments on commit f995110

Please sign in to comment.