Menu designer: Use Invalidate instead of Repaint.

git-svn-id: trunk@53080 -
This commit is contained in:
juha 2016-10-08 11:02:15 +00:00
parent 45e651f472
commit bd674747c1
2 changed files with 15 additions and 15 deletions

View File

@ -739,7 +739,7 @@ begin
GlobalDesignHook.RefreshPropertyValues;
GlobalDesignHook.Modified(FEditedMenuItem);
//UpdateBoxLocationsAndSizes;
EditedShadow.Repaint;
EditedShadow.Invalidate;
//FDesigner.FGui.UpdateStatistics;
end;
EditedShadow.SetFocus;
@ -964,7 +964,7 @@ begin
RemoveComponent(sb);
si:=GetShadowForMenuItem(sb.ParentMenuItem);
if Assigned(si) then
si.Repaint;
si.Invalidate;
FreeAndNil(sb);
end;
end;
@ -1458,7 +1458,7 @@ begin
idx:=ChooseIconFromImageListDlg(FMenu.Images);
if (idx > -1) then begin
FSelectedMenuItem.ImageIndex:=idx;
selected.Repaint;
selected.Invalidate;
UpdateActionsEnabledness;
FEditorDesigner.PropertyEditorHook.RefreshPropertyValues;
FEditorDesigner.Modified;
@ -1470,7 +1470,7 @@ begin
idx:=ChooseIconFromImageListDlg(FSelectedMenuItem.Parent.SubMenuImages);
if (idx > -1) then begin
FSelectedMenuItem.ImageIndex:=idx;
selected.Repaint;
selected.Invalidate;
UpdateActionsEnabledness;
FEditorDesigner.PropertyEditorHook.RefreshPropertyValues;
FEditorDesigner.Modified;
@ -1548,7 +1548,7 @@ begin
UpdateBoxLocationsAndSizes;
RefreshFakes;
if (FSelectedMenuItem <> nil) then
SelectedShadowItem.Repaint;
SelectedShadowItem.Invalidate;
end;
end;
end;
@ -1581,7 +1581,7 @@ begin
FDesigner.Shortcuts.UpdateShortcutList(True);
if (FSelectedMenuItem <> nil) then begin
RefreshFakes;
SelectedShadowItem.Repaint;
SelectedShadowItem.Invalidate;
end;
FDesigner.FGui.UpdateStatistics;
end;
@ -2311,7 +2311,7 @@ procedure TShadowItem.SetState(AValue: TShadowItemDisplayState);
begin
if (FState <> AValue) then begin
FState:=AValue;
Repaint;
Invalidate;
end;
end;
@ -2683,7 +2683,7 @@ procedure TShadowItem.ShowNormal;
begin
if (FState <> dsNormal) then begin
FState:=dsNormal;
Repaint;
Invalidate;
end;
end;
@ -2691,7 +2691,7 @@ procedure TShadowItem.ShowSelected;
begin
if (FState <> dsSelected) then begin
FState:=dsSelected;
Repaint;
Invalidate;
end;
end;
@ -2699,7 +2699,7 @@ procedure TShadowItem.ShowDisabled;
begin
if (FState <> dsDisabled) then begin
FState:=dsDisabled;
Repaint;
Invalidate;
end;
end;

View File

@ -727,11 +727,11 @@ begin
case aValue of
True: if (FRIState <> risDown) then begin // set to True
FRIState:=risDown;
Repaint;
Invalidate;
end;
False: if (FRIState <> risUp) then begin // set to False
FRIState:=risUp;
Repaint;
Invalidate;
end;
end;
end;
@ -747,7 +747,7 @@ begin
inherited MouseDown(Button, Shift, X, Y);
if (Button = mbLeft) and (FRIState in [risUncheckedHot, risUp]) then begin
FRIState:=risPressed;
Repaint;
Invalidate;
DoChange;
end;
end;
@ -759,7 +759,7 @@ begin
risUp: FRIState:=risUncheckedHot;
risDown: FRIState:=risCheckedHot;
end;
Repaint;
Invalidate;
end;
procedure TRadioIcon.MouseLeave;
@ -768,7 +768,7 @@ begin
risPressed, risCheckedHot: FRIState:=risDown;
risUncheckedHot: FRIState:=risUp;
end;
Repaint;
Invalidate;
inherited MouseLeave;
end;