From a6420aeb0558ed4e0b1fe60ba7b7b8059196c791 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Mon, 12 Feb 2018 11:10:53 +0000 Subject: [PATCH] spktoolbar: Fix incorrect dropdown button width in Contents Editor at high dpi. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6198 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/spktoolbar/designtime/SpkToolbarEditor.pas | 9 ++++----- components/spktoolbar/designtime/spkte_EditWindow.pas | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/components/spktoolbar/designtime/SpkToolbarEditor.pas b/components/spktoolbar/designtime/SpkToolbarEditor.pas index c9d8072fa..80a08851b 100644 --- a/components/spktoolbar/designtime/SpkToolbarEditor.pas +++ b/components/spktoolbar/designtime/SpkToolbarEditor.pas @@ -268,12 +268,13 @@ begin if not(Component is TSpkToolbar) then exit; + if EditWindow = nil then + EditWindow := TfrmEditWindow.Create(nil); EditWindow.SetData(TSpkToolbar(Component),Self.GetDesigner); EditWindow.Show; end; procedure TSpkToolbarEditor.Edit; - begin DoOpenContentsEditor; end; @@ -371,11 +372,9 @@ begin end; initialization - -EditWindow:=TfrmEditWindow.create(nil); + //EditWindow:=TfrmEditWindow.create(nil); finalization - -EditWindow.Free; + EditWindow.Free; end. diff --git a/components/spktoolbar/designtime/spkte_EditWindow.pas b/components/spktoolbar/designtime/spkte_EditWindow.pas index 7ca66ff03..514240a2c 100644 --- a/components/spktoolbar/designtime/spkte_EditWindow.pas +++ b/components/spktoolbar/designtime/spkte_EditWindow.pas @@ -127,6 +127,9 @@ implementation {$R *.lfm} +uses + IDEWindowIntf; + resourcestring RSCannotMoveAboveFirstElement = 'You can not move above the top of the first element!'; RSCannotMoveBeyondLastElement = 'You can not move beyond the last element!'; @@ -1173,6 +1176,7 @@ begin end; tbToolbar.ButtonHeight := tbToolbar.Images.Height + 8; // tbToolbar.ButtonWidth := tbToolbar.Images.Width + 8; + IDEDialogLayoutList.ApplyLayout(self); end; end.