mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 22:18:15 +02:00
IDE: designer: menu editor: less overhead
git-svn-id: trunk@52225 -
This commit is contained in:
parent
4819139549
commit
75349695d6
@ -1864,33 +1864,33 @@ begin
|
||||
FInitialSelectedMenuItem := aSelect;
|
||||
SetInitialBounds(0, 0, aWidth, aHeight);
|
||||
Name := 'ShadowMenu';
|
||||
FItemsPopupMenu := TPopupMenu.Create(Self);
|
||||
FItemsPopupMenu.Name := 'ItemsPopupMenu';
|
||||
FActionList := TActionList.Create(Self);
|
||||
SetupPopupMenu;
|
||||
FAddItemFake := TAddSiblingFake.Create(Self);
|
||||
FAddItemFake.OnClick := @AddItemAfter;
|
||||
FAddItemFake.Caption := lisMenuEditorAddMenuItem;
|
||||
FAddItemFake.Name := 'AddItemFake';
|
||||
FAddSubmenuFake := TAddSubmenuFake.Create(Self);
|
||||
FAddSubmenuFake.OnClick := @AddSubMenu;
|
||||
FAddSubmenuFake.Caption := lisMenuEditorAddSubmenu;
|
||||
FAddSubmenuFake.Name := 'AddSubmenuFake';
|
||||
FAddFirstItemFake := TAddFirstFake.Create(Self);
|
||||
FAddFirstItemFake.OnClick := @AddFirstMenu;
|
||||
FAddFirstItemFake.Caption := lisMenuEditorAddMenuItem;
|
||||
FAddFirstItemFake.Name := 'AddFirstItemFake';
|
||||
FAddFirstItemFake.Left := Popup_Origin.x;
|
||||
FAddFirstItemFake.Top := Popup_Origin.y;
|
||||
FInPlaceEditor := TEdit.Create(Self);
|
||||
FInPlaceEditor.OnKeyDown := @InPlaceEditKeyDown;
|
||||
FInPlaceEditor.Visible := False;
|
||||
ConnectSpeedButtonOnClickMethods;
|
||||
GlobalDesignHook.AddHandlerObjectPropertyChanged(@OnObjectPropertyChanged);
|
||||
GlobalDesignHook.AddHandlerModified(@OnDesignerModified);
|
||||
GlobalDesignHook.AddHandlerRefreshPropertyValues(@OnDesignerRefreshPropertyValues);
|
||||
DisableAutoSizing;
|
||||
try
|
||||
FItemsPopupMenu := TPopupMenu.Create(Self);
|
||||
FItemsPopupMenu.Name := 'ItemsPopupMenu';
|
||||
FActionList := TActionList.Create(Self);
|
||||
SetupPopupMenu;
|
||||
FAddItemFake := TAddSiblingFake.Create(Self);
|
||||
FAddItemFake.OnClick := @AddItemAfter;
|
||||
FAddItemFake.Caption := lisMenuEditorAddMenuItem;
|
||||
FAddItemFake.Name := 'AddItemFake';
|
||||
FAddSubmenuFake := TAddSubmenuFake.Create(Self);
|
||||
FAddSubmenuFake.OnClick := @AddSubMenu;
|
||||
FAddSubmenuFake.Caption := lisMenuEditorAddSubmenu;
|
||||
FAddSubmenuFake.Name := 'AddSubmenuFake';
|
||||
FAddFirstItemFake := TAddFirstFake.Create(Self);
|
||||
FAddFirstItemFake.OnClick := @AddFirstMenu;
|
||||
FAddFirstItemFake.Caption := lisMenuEditorAddMenuItem;
|
||||
FAddFirstItemFake.Name := 'AddFirstItemFake';
|
||||
FAddFirstItemFake.Left := Popup_Origin.x;
|
||||
FAddFirstItemFake.Top := Popup_Origin.y;
|
||||
FInPlaceEditor := TEdit.Create(Self);
|
||||
FInPlaceEditor.OnKeyDown := @InPlaceEditKeyDown;
|
||||
FInPlaceEditor.Visible := False;
|
||||
ConnectSpeedButtonOnClickMethods;
|
||||
GlobalDesignHook.AddHandlerObjectPropertyChanged(@OnObjectPropertyChanged);
|
||||
GlobalDesignHook.AddHandlerModified(@OnDesignerModified);
|
||||
GlobalDesignHook.AddHandlerRefreshPropertyValues(@OnDesignerRefreshPropertyValues);
|
||||
AutoSize := False;
|
||||
Color := clBtnFace;
|
||||
BorderStyle := bsNone;
|
||||
|
Loading…
Reference in New Issue
Block a user