mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 17:19:19 +02:00
Menu designer: formatting.
git-svn-id: trunk@54374 -
This commit is contained in:
parent
13a7fe6856
commit
b77306c3df
@ -1585,7 +1585,7 @@ begin
|
|||||||
if FSelectedMenuItem = nil then
|
if FSelectedMenuItem = nil then
|
||||||
Exit;
|
Exit;
|
||||||
comp:=GlobalDesignHook.GetComponent(FSelectedMenuItem.Name);
|
comp:=GlobalDesignHook.GetComponent(FSelectedMenuItem.Name);
|
||||||
if (comp<>nil) and (comp is TMenuItem) then
|
if comp is TMenuItem then
|
||||||
begin
|
begin
|
||||||
selBox:=SelectedShadowBox;
|
selBox:=SelectedShadowBox;
|
||||||
if (selBox.LastRIValue <> mi.RadioItem) then
|
if (selBox.LastRIValue <> mi.RadioItem) then
|
||||||
@ -1597,8 +1597,7 @@ function TShadowMenu.OnClickIsAssigned(aMI: TMenuItem): boolean;
|
|||||||
begin
|
begin
|
||||||
if (aMI = nil) then
|
if (aMI = nil) then
|
||||||
Exit(False);
|
Exit(False);
|
||||||
Result:=(FEditorDesigner.PropertyEditorHook.GetMethodName
|
Result:=(FEditorDesigner.PropertyEditorHook.GetMethodName(GetMethodProp(aMI, 'OnClick'), aMI) <> '');
|
||||||
(GetMethodProp(aMI, 'OnClick'), aMI) <> '');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TShadowMenu.Paint;
|
procedure TShadowMenu.Paint;
|
||||||
@ -1611,18 +1610,18 @@ procedure TShadowMenu.SetParent(NewParent: TWinControl);
|
|||||||
begin
|
begin
|
||||||
inherited SetParent(NewParent);
|
inherited SetParent(NewParent);
|
||||||
if (NewParent <> nil) and not (csDestroying in ComponentState) then
|
if (NewParent <> nil) and not (csDestroying in ComponentState) then
|
||||||
begin
|
begin
|
||||||
Align:=alNone;
|
Align:=alNone;
|
||||||
CreateShadowBoxesAndItems;
|
CreateShadowBoxesAndItems;
|
||||||
UpdateBoxLocationsAndSizes;
|
UpdateBoxLocationsAndSizes;
|
||||||
HideBoxesAboveLevel(0);
|
HideBoxesAboveLevel(0);
|
||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
FInitialising:=True;
|
FInitialising:=True;
|
||||||
if (FInitialSelectedMenuItem <> nil) then begin
|
if (FInitialSelectedMenuItem <> nil) then begin
|
||||||
SetSelectedMenuItem(FInitialSelectedMenuItem, True, False);
|
SetSelectedMenuItem(FInitialSelectedMenuItem, True, False);
|
||||||
UpdateActionsEnabledness;
|
UpdateActionsEnabledness;
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TShadowMenu.SetSelectedMenuItem(aMI: TMenuItem;
|
procedure TShadowMenu.SetSelectedMenuItem(aMI: TMenuItem;
|
||||||
|
@ -501,21 +501,21 @@ var
|
|||||||
isPopupMenu: boolean;
|
isPopupMenu: boolean;
|
||||||
begin
|
begin
|
||||||
if not FGUIEnabled then
|
if not FGUIEnabled then
|
||||||
begin
|
begin
|
||||||
StatisticsGroupBox.Font.Style:=[fsBold];
|
StatisticsGroupBox.Font.Style:=[fsBold];
|
||||||
StatisticsGroupBox.Caption:=FEditedMenu.Name;
|
StatisticsGroupBox.Caption:=FEditedMenu.Name;
|
||||||
StatisticsGroupBox.Enabled:=True;
|
StatisticsGroupBox.Enabled:=True;
|
||||||
ButtonsGroupBox.Enabled:=not selectedIsNil;
|
ButtonsGroupBox.Enabled:=not selectedIsNil;
|
||||||
if selectedIsNil then
|
if selectedIsNil then
|
||||||
Caption:=Format(lisMenuEditorEditingSSNoMenuItemSelected,
|
Caption:=Format(lisMenuEditorEditingSSNoMenuItemSelected,
|
||||||
[TComponent(GlobalDesignHook.LookupRoot).Name, FEditedMenu.Name]);
|
[TComponent(GlobalDesignHook.LookupRoot).Name, FEditedMenu.Name]);
|
||||||
isPopupMenu:=(FEditedMenu is TPopupMenu);
|
isPopupMenu:=(FEditedMenu is TPopupMenu);
|
||||||
LoadVariableButtonGlyphs(not isPopupMenu);
|
LoadVariableButtonGlyphs(not isPopupMenu);
|
||||||
if isPopupMenu then
|
if isPopupMenu then
|
||||||
ShowPopupAssignmentsInfo
|
ShowPopupAssignmentsInfo
|
||||||
else HidePopupAssignmentsInfo;
|
else HidePopupAssignmentsInfo;
|
||||||
FGUIEnabled:=True;
|
FGUIEnabled:=True;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMenuDesignerForm.InitializeStatisticVars;
|
procedure TMenuDesignerForm.InitializeStatisticVars;
|
||||||
|
Loading…
Reference in New Issue
Block a user