mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 03:37:10 +01:00
Menu designer: Use Invalidate instead of Repaint.
git-svn-id: trunk@53080 -
This commit is contained in:
parent
45e651f472
commit
bd674747c1
@ -739,7 +739,7 @@ begin
|
|||||||
GlobalDesignHook.RefreshPropertyValues;
|
GlobalDesignHook.RefreshPropertyValues;
|
||||||
GlobalDesignHook.Modified(FEditedMenuItem);
|
GlobalDesignHook.Modified(FEditedMenuItem);
|
||||||
//UpdateBoxLocationsAndSizes;
|
//UpdateBoxLocationsAndSizes;
|
||||||
EditedShadow.Repaint;
|
EditedShadow.Invalidate;
|
||||||
//FDesigner.FGui.UpdateStatistics;
|
//FDesigner.FGui.UpdateStatistics;
|
||||||
end;
|
end;
|
||||||
EditedShadow.SetFocus;
|
EditedShadow.SetFocus;
|
||||||
@ -964,7 +964,7 @@ begin
|
|||||||
RemoveComponent(sb);
|
RemoveComponent(sb);
|
||||||
si:=GetShadowForMenuItem(sb.ParentMenuItem);
|
si:=GetShadowForMenuItem(sb.ParentMenuItem);
|
||||||
if Assigned(si) then
|
if Assigned(si) then
|
||||||
si.Repaint;
|
si.Invalidate;
|
||||||
FreeAndNil(sb);
|
FreeAndNil(sb);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1458,7 +1458,7 @@ begin
|
|||||||
idx:=ChooseIconFromImageListDlg(FMenu.Images);
|
idx:=ChooseIconFromImageListDlg(FMenu.Images);
|
||||||
if (idx > -1) then begin
|
if (idx > -1) then begin
|
||||||
FSelectedMenuItem.ImageIndex:=idx;
|
FSelectedMenuItem.ImageIndex:=idx;
|
||||||
selected.Repaint;
|
selected.Invalidate;
|
||||||
UpdateActionsEnabledness;
|
UpdateActionsEnabledness;
|
||||||
FEditorDesigner.PropertyEditorHook.RefreshPropertyValues;
|
FEditorDesigner.PropertyEditorHook.RefreshPropertyValues;
|
||||||
FEditorDesigner.Modified;
|
FEditorDesigner.Modified;
|
||||||
@ -1470,7 +1470,7 @@ begin
|
|||||||
idx:=ChooseIconFromImageListDlg(FSelectedMenuItem.Parent.SubMenuImages);
|
idx:=ChooseIconFromImageListDlg(FSelectedMenuItem.Parent.SubMenuImages);
|
||||||
if (idx > -1) then begin
|
if (idx > -1) then begin
|
||||||
FSelectedMenuItem.ImageIndex:=idx;
|
FSelectedMenuItem.ImageIndex:=idx;
|
||||||
selected.Repaint;
|
selected.Invalidate;
|
||||||
UpdateActionsEnabledness;
|
UpdateActionsEnabledness;
|
||||||
FEditorDesigner.PropertyEditorHook.RefreshPropertyValues;
|
FEditorDesigner.PropertyEditorHook.RefreshPropertyValues;
|
||||||
FEditorDesigner.Modified;
|
FEditorDesigner.Modified;
|
||||||
@ -1548,7 +1548,7 @@ begin
|
|||||||
UpdateBoxLocationsAndSizes;
|
UpdateBoxLocationsAndSizes;
|
||||||
RefreshFakes;
|
RefreshFakes;
|
||||||
if (FSelectedMenuItem <> nil) then
|
if (FSelectedMenuItem <> nil) then
|
||||||
SelectedShadowItem.Repaint;
|
SelectedShadowItem.Invalidate;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1581,7 +1581,7 @@ begin
|
|||||||
FDesigner.Shortcuts.UpdateShortcutList(True);
|
FDesigner.Shortcuts.UpdateShortcutList(True);
|
||||||
if (FSelectedMenuItem <> nil) then begin
|
if (FSelectedMenuItem <> nil) then begin
|
||||||
RefreshFakes;
|
RefreshFakes;
|
||||||
SelectedShadowItem.Repaint;
|
SelectedShadowItem.Invalidate;
|
||||||
end;
|
end;
|
||||||
FDesigner.FGui.UpdateStatistics;
|
FDesigner.FGui.UpdateStatistics;
|
||||||
end;
|
end;
|
||||||
@ -2311,7 +2311,7 @@ procedure TShadowItem.SetState(AValue: TShadowItemDisplayState);
|
|||||||
begin
|
begin
|
||||||
if (FState <> AValue) then begin
|
if (FState <> AValue) then begin
|
||||||
FState:=AValue;
|
FState:=AValue;
|
||||||
Repaint;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2683,7 +2683,7 @@ procedure TShadowItem.ShowNormal;
|
|||||||
begin
|
begin
|
||||||
if (FState <> dsNormal) then begin
|
if (FState <> dsNormal) then begin
|
||||||
FState:=dsNormal;
|
FState:=dsNormal;
|
||||||
Repaint;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2691,7 +2691,7 @@ procedure TShadowItem.ShowSelected;
|
|||||||
begin
|
begin
|
||||||
if (FState <> dsSelected) then begin
|
if (FState <> dsSelected) then begin
|
||||||
FState:=dsSelected;
|
FState:=dsSelected;
|
||||||
Repaint;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2699,7 +2699,7 @@ procedure TShadowItem.ShowDisabled;
|
|||||||
begin
|
begin
|
||||||
if (FState <> dsDisabled) then begin
|
if (FState <> dsDisabled) then begin
|
||||||
FState:=dsDisabled;
|
FState:=dsDisabled;
|
||||||
Repaint;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -727,11 +727,11 @@ begin
|
|||||||
case aValue of
|
case aValue of
|
||||||
True: if (FRIState <> risDown) then begin // set to True
|
True: if (FRIState <> risDown) then begin // set to True
|
||||||
FRIState:=risDown;
|
FRIState:=risDown;
|
||||||
Repaint;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
False: if (FRIState <> risUp) then begin // set to False
|
False: if (FRIState <> risUp) then begin // set to False
|
||||||
FRIState:=risUp;
|
FRIState:=risUp;
|
||||||
Repaint;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -747,7 +747,7 @@ begin
|
|||||||
inherited MouseDown(Button, Shift, X, Y);
|
inherited MouseDown(Button, Shift, X, Y);
|
||||||
if (Button = mbLeft) and (FRIState in [risUncheckedHot, risUp]) then begin
|
if (Button = mbLeft) and (FRIState in [risUncheckedHot, risUp]) then begin
|
||||||
FRIState:=risPressed;
|
FRIState:=risPressed;
|
||||||
Repaint;
|
Invalidate;
|
||||||
DoChange;
|
DoChange;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -759,7 +759,7 @@ begin
|
|||||||
risUp: FRIState:=risUncheckedHot;
|
risUp: FRIState:=risUncheckedHot;
|
||||||
risDown: FRIState:=risCheckedHot;
|
risDown: FRIState:=risCheckedHot;
|
||||||
end;
|
end;
|
||||||
Repaint;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRadioIcon.MouseLeave;
|
procedure TRadioIcon.MouseLeave;
|
||||||
@ -768,7 +768,7 @@ begin
|
|||||||
risPressed, risCheckedHot: FRIState:=risDown;
|
risPressed, risCheckedHot: FRIState:=risDown;
|
||||||
risUncheckedHot: FRIState:=risUp;
|
risUncheckedHot: FRIState:=risUp;
|
||||||
end;
|
end;
|
||||||
Repaint;
|
Invalidate;
|
||||||
inherited MouseLeave;
|
inherited MouseLeave;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user