fix, reset top splitter position before locking it

This commit is contained in:
Basile Burg 2016-02-03 15:32:18 +01:00
parent 605a24c1ff
commit c864a0ce50
2 changed files with 10 additions and 1 deletions

View File

@ -5,6 +5,8 @@ object CEMainForm: TCEMainForm
Width = 745
AllowDropFiles = True
Caption = 'Coedit'
ClientHeight = 49
ClientWidth = 745
Icon.Data = {
F1B500000000010001000000000001002000DBB500001600000089504E470D0A
1A0A0000000D49484452000001000000010008060000005C72A8660000B5A249
@ -1469,6 +1471,7 @@ object CEMainForm: TCEMainForm
OnDropFiles = FormDropFiles
ShowHint = True
LCLVersion = '1.6.0.2'
Visible = False
object mainMenu: TMainMenu
Images = imgList
top = 1

View File

@ -935,14 +935,20 @@ begin
end;
end;
// lock space wetween the menu and the widgets
// lock space between the menu and the widgets
if GetDockSplitterOrParent(DockMaster.GetSite(fEditWidg), akTop, topsite) then
begin
if topsite is TAnchorDockHostSite then
if TAnchorDockHostSite(topsite).BoundSplitter.isNotNil then
begin
TAnchorDockHostSite(topsite).BoundSplitter.MoveSplitter(-500);
TAnchorDockHostSite(topsite).BoundSplitter.OnCanOffset:= @LockTopWindow;
end;
end else if GetDockSplitter(DockMaster.GetSite(fEditWidg), akTop, topsplt) then
begin
topsplt.MoveSplitter(-500);
topsplt.OnCanOffset:= @LockTopWindow;
end;
end;