mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 01:56:36 +08:00
Realign most controls on SQL help dialog, sanitize them from weird paddings and margins. Remove statusbar which was just there to display the size grip in the lower right corner.
This commit is contained in:
@ -16,11 +16,49 @@ object frmSQLhelp: TfrmSQLhelp
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object btnSearchOnline: TButton
|
||||
Left = 363
|
||||
Top = 322
|
||||
Width = 103
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Search online'
|
||||
ImageIndex = 69
|
||||
Images = MainForm.ImageListMain
|
||||
TabOrder = 0
|
||||
OnClick = ButtonOnlinehelpClick
|
||||
end
|
||||
object ButtonClose: TButton
|
||||
Left = 472
|
||||
Top = 322
|
||||
Width = 102
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Cancel = True
|
||||
Caption = 'Close'
|
||||
Default = True
|
||||
ModalResult = 1
|
||||
TabOrder = 1
|
||||
OnClick = ButtonCloseClick
|
||||
end
|
||||
object pnlMain: TPanel
|
||||
AlignWithMargins = True
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 566
|
||||
Height = 307
|
||||
Margins.Left = 8
|
||||
Margins.Top = 8
|
||||
Margins.Right = 8
|
||||
Margins.Bottom = 40
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 2
|
||||
object Splitter1: TSplitter
|
||||
Left = 153
|
||||
Top = 0
|
||||
Width = 8
|
||||
Height = 336
|
||||
Height = 307
|
||||
Cursor = crSizeWE
|
||||
ResizeStyle = rsUpdate
|
||||
end
|
||||
@ -28,16 +66,18 @@ object frmSQLhelp: TfrmSQLhelp
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 153
|
||||
Height = 336
|
||||
Height = 307
|
||||
Align = alLeft
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 0
|
||||
object treeTopics: TTreeView
|
||||
AlignWithMargins = True
|
||||
Left = 3
|
||||
Top = 27
|
||||
Width = 147
|
||||
Height = 309
|
||||
Left = 0
|
||||
Top = 24
|
||||
Width = 153
|
||||
Height = 283
|
||||
Margins.Left = 0
|
||||
Margins.Right = 0
|
||||
Margins.Bottom = 0
|
||||
Align = alClient
|
||||
ChangeDelay = 50
|
||||
@ -51,10 +91,13 @@ object frmSQLhelp: TfrmSQLhelp
|
||||
end
|
||||
object editFilter: TButtonedEdit
|
||||
AlignWithMargins = True
|
||||
Left = 3
|
||||
Top = 3
|
||||
Width = 147
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 153
|
||||
Height = 21
|
||||
Margins.Left = 0
|
||||
Margins.Top = 0
|
||||
Margins.Right = 0
|
||||
Margins.Bottom = 0
|
||||
Align = alTop
|
||||
Images = MainForm.ImageListMain
|
||||
@ -65,53 +108,41 @@ object frmSQLhelp: TfrmSQLhelp
|
||||
OnChange = editFilterChange
|
||||
end
|
||||
end
|
||||
object StatusBar1: TStatusBar
|
||||
Left = 0
|
||||
Top = 336
|
||||
Width = 582
|
||||
Height = 19
|
||||
Panels = <>
|
||||
end
|
||||
object pnlRight: TPanel
|
||||
Left = 161
|
||||
Top = 0
|
||||
Width = 421
|
||||
Height = 336
|
||||
Width = 405
|
||||
Height = 307
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
Padding.Top = 3
|
||||
Padding.Right = 3
|
||||
Padding.Bottom = 3
|
||||
TabOrder = 2
|
||||
TabOrder = 1
|
||||
object Splitter2: TSplitter
|
||||
Left = 0
|
||||
Top = 171
|
||||
Width = 418
|
||||
Top = 182
|
||||
Width = 405
|
||||
Height = 8
|
||||
Cursor = crSizeNS
|
||||
Align = alTop
|
||||
ResizeStyle = rsUpdate
|
||||
end
|
||||
object pnlRightTop: TPanel
|
||||
object lblDescription: TLabel
|
||||
Left = 0
|
||||
Top = 3
|
||||
Width = 418
|
||||
Height = 168
|
||||
Align = alTop
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 0
|
||||
object lblKeyword: TLabel
|
||||
AlignWithMargins = True
|
||||
Left = 0
|
||||
Top = 5
|
||||
Width = 418
|
||||
Height = 16
|
||||
Top = 16
|
||||
Width = 405
|
||||
Height = 13
|
||||
Margins.Left = 0
|
||||
Margins.Top = 5
|
||||
Margins.Right = 0
|
||||
Margins.Bottom = 0
|
||||
Align = alTop
|
||||
Caption = 'Description:'
|
||||
end
|
||||
object lblKeyword: TLabel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 405
|
||||
Height = 16
|
||||
Align = alTop
|
||||
Caption = 'lblKeyword'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
@ -120,68 +151,10 @@ object frmSQLhelp: TfrmSQLhelp
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object lblDescription: TLabel
|
||||
AlignWithMargins = True
|
||||
Left = 0
|
||||
Top = 26
|
||||
Width = 418
|
||||
Height = 13
|
||||
Margins.Left = 0
|
||||
Margins.Top = 5
|
||||
Margins.Right = 0
|
||||
Margins.Bottom = 0
|
||||
Align = alTop
|
||||
Caption = 'Description:'
|
||||
end
|
||||
object memoDescription: TSynMemo
|
||||
AlignWithMargins = True
|
||||
Left = 0
|
||||
Top = 44
|
||||
Width = 418
|
||||
Height = 124
|
||||
Margins.Left = 0
|
||||
Margins.Top = 5
|
||||
Margins.Right = 0
|
||||
Margins.Bottom = 0
|
||||
SingleLineMode = False
|
||||
Align = alClient
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = 'Courier New'
|
||||
Font.Style = []
|
||||
TabOrder = 0
|
||||
OnKeyDown = memosKeyDown
|
||||
Gutter.Font.Charset = DEFAULT_CHARSET
|
||||
Gutter.Font.Color = clWindowText
|
||||
Gutter.Font.Height = -11
|
||||
Gutter.Font.Name = 'Courier New'
|
||||
Gutter.Font.Style = []
|
||||
Gutter.Visible = False
|
||||
Gutter.Width = 0
|
||||
Highlighter = URIHighlighter
|
||||
Options = [eoAutoIndent, eoDragDropEditing, eoEnhanceEndKey, eoGroupUndo, eoHideShowScrollbars, eoShowScrollHint, eoSmartTabDelete, eoSmartTabs, eoTabsToSpaces]
|
||||
ReadOnly = True
|
||||
RightEdge = 0
|
||||
WordWrap = True
|
||||
end
|
||||
end
|
||||
object pnlRightBottom: TPanel
|
||||
Left = 0
|
||||
Top = 179
|
||||
Width = 418
|
||||
Height = 154
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 1
|
||||
DesignSize = (
|
||||
418
|
||||
154)
|
||||
object lblExample: TLabel
|
||||
AlignWithMargins = True
|
||||
Left = 0
|
||||
Top = 5
|
||||
Width = 418
|
||||
Top = 190
|
||||
Width = 405
|
||||
Height = 13
|
||||
Margins.Left = 0
|
||||
Margins.Top = 5
|
||||
@ -190,31 +163,13 @@ object frmSQLhelp: TfrmSQLhelp
|
||||
Align = alTop
|
||||
Caption = 'Example:'
|
||||
end
|
||||
object btnSearchOnline: TButton
|
||||
Left = 207
|
||||
Top = 128
|
||||
Width = 103
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Search online'
|
||||
ImageIndex = 69
|
||||
Images = MainForm.ImageListMain
|
||||
TabOrder = 2
|
||||
OnClick = ButtonOnlinehelpClick
|
||||
end
|
||||
object MemoExample: TSynMemo
|
||||
AlignWithMargins = True
|
||||
object memoDescription: TSynMemo
|
||||
Left = 0
|
||||
Top = 23
|
||||
Width = 418
|
||||
Height = 90
|
||||
Margins.Left = 0
|
||||
Margins.Top = 5
|
||||
Margins.Right = 0
|
||||
Margins.Bottom = 0
|
||||
Top = 29
|
||||
Width = 405
|
||||
Height = 153
|
||||
SingleLineMode = False
|
||||
Align = alTop
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
@ -235,18 +190,32 @@ object frmSQLhelp: TfrmSQLhelp
|
||||
RightEdge = 0
|
||||
WordWrap = True
|
||||
end
|
||||
object ButtonClose: TButton
|
||||
Left = 316
|
||||
Top = 128
|
||||
Width = 102
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Cancel = True
|
||||
Caption = 'Close'
|
||||
Default = True
|
||||
ModalResult = 1
|
||||
object MemoExample: TSynMemo
|
||||
Left = 0
|
||||
Top = 203
|
||||
Width = 405
|
||||
Height = 104
|
||||
SingleLineMode = False
|
||||
Align = alClient
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = 'Courier New'
|
||||
Font.Style = []
|
||||
TabOrder = 1
|
||||
OnClick = ButtonCloseClick
|
||||
OnKeyDown = memosKeyDown
|
||||
Gutter.Font.Charset = DEFAULT_CHARSET
|
||||
Gutter.Font.Color = clWindowText
|
||||
Gutter.Font.Height = -11
|
||||
Gutter.Font.Name = 'Courier New'
|
||||
Gutter.Font.Style = []
|
||||
Gutter.Visible = False
|
||||
Gutter.Width = 0
|
||||
Highlighter = URIHighlighter
|
||||
Options = [eoAutoIndent, eoDragDropEditing, eoEnhanceEndKey, eoGroupUndo, eoHideShowScrollbars, eoShowScrollHint, eoSmartTabDelete, eoSmartTabs, eoTabsToSpaces]
|
||||
ReadOnly = True
|
||||
RightEdge = 0
|
||||
WordWrap = True
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -10,25 +10,23 @@ uses
|
||||
|
||||
type
|
||||
TfrmSQLhelp = class(TForm)
|
||||
pnlLeft: TPanel;
|
||||
StatusBar1: TStatusBar;
|
||||
Splitter1: TSplitter;
|
||||
treeTopics: TTreeView;
|
||||
pnlRight: TPanel;
|
||||
pnlRightTop: TPanel;
|
||||
lblKeyword: TLabel;
|
||||
lblDescription: TLabel;
|
||||
memoDescription: TSynMemo;
|
||||
Splitter2: TSplitter;
|
||||
pnlRightBottom: TPanel;
|
||||
lblExample: TLabel;
|
||||
MemoExample: TSynMemo;
|
||||
ButtonClose: TButton;
|
||||
btnSearchOnline: TButton;
|
||||
URIOpenerDescription: TSynURIOpener;
|
||||
URIHighlighter: TSynURISyn;
|
||||
URIOpenerExample: TSynURIOpener;
|
||||
btnSearchOnline: TButton;
|
||||
ButtonClose: TButton;
|
||||
pnlMain: TPanel;
|
||||
pnlLeft: TPanel;
|
||||
treeTopics: TTreeView;
|
||||
editFilter: TButtonedEdit;
|
||||
pnlRight: TPanel;
|
||||
Splitter2: TSplitter;
|
||||
Splitter1: TSplitter;
|
||||
lblDescription: TLabel;
|
||||
lblKeyword: TLabel;
|
||||
memoDescription: TSynMemo;
|
||||
lblExample: TLabel;
|
||||
MemoExample: TSynMemo;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure treeTopicsExpanding(Sender: TObject; Node: TTreeNode;
|
||||
var AllowExpansion: Boolean);
|
||||
@ -73,6 +71,7 @@ uses helpers, main;
|
||||
procedure TfrmSQLhelp.FormCreate(Sender: TObject);
|
||||
begin
|
||||
InheritFont(Font);
|
||||
SetWindowSizeGrip(Handle, True);
|
||||
end;
|
||||
|
||||
|
||||
@ -87,7 +86,7 @@ begin
|
||||
Width := GetRegValue( REGNAME_SQLHELPWINWIDTH, Width );
|
||||
Height := GetRegValue( REGNAME_SQLHELPWINHEIGHT, Height );
|
||||
pnlLeft.Width := GetRegValue( REGNAME_SQLHELPPLWIDTH, pnlLeft.Width );
|
||||
pnlRightTop.Height := GetRegValue( REGNAME_SQLHELPPRHEIGHT, pnlRightTop.Height );
|
||||
memoDescription.Height := GetRegValue( REGNAME_SQLHELPPRHEIGHT, memoDescription.Height );
|
||||
Caption := DEFAULT_WINDOW_CAPTION;
|
||||
MainForm.SetupSynEditors;
|
||||
|
||||
@ -263,19 +262,10 @@ begin
|
||||
end;
|
||||
|
||||
// Show the user if topic is (not) available
|
||||
with MemoDescription do
|
||||
begin
|
||||
Enabled := Text <> '';
|
||||
if not Enabled then
|
||||
Text := 'No help available for this keyword or no keyword was selected.';
|
||||
end;
|
||||
with MemoExample do
|
||||
begin
|
||||
Enabled := Text <> '';
|
||||
if not Enabled then
|
||||
Text := 'No example available or no keyword was selected.';
|
||||
end;
|
||||
|
||||
if memoDescription.Text = '' then
|
||||
memoDescription.Text := 'No help available for this keyword or no keyword was selected.';
|
||||
if memoExample.Text = '' then
|
||||
memoExample.Text := 'No example available or no keyword was selected.';
|
||||
end;
|
||||
|
||||
|
||||
@ -291,7 +281,7 @@ begin
|
||||
MainReg.WriteInteger( REGNAME_SQLHELPWINWIDTH, Width );
|
||||
MainReg.WriteInteger( REGNAME_SQLHELPWINHEIGHT, Height );
|
||||
MainReg.WriteInteger( REGNAME_SQLHELPPLWIDTH, pnlLeft.Width );
|
||||
MainReg.WriteInteger( REGNAME_SQLHELPPRHEIGHT, PnlRightTop.Height );
|
||||
MainReg.WriteInteger( REGNAME_SQLHELPPRHEIGHT, memoDescription.Height );
|
||||
Close;
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user