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