mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 13:59:18 +02:00
MenuEditor: Fixed wrong item height when in ObjectInspector caption is set from text to "-" and vice versa. Issue #33415
git-svn-id: branches/fixes_1_8@57813 -
This commit is contained in:
parent
bb0d8a9a63
commit
f9306c95d1
@ -96,6 +96,7 @@ type
|
|||||||
constructor CreateWithBoxAndItem(aSMenu: TShadowMenu; aParentBox: TShadowBox;
|
constructor CreateWithBoxAndItem(aSMenu: TShadowMenu; aParentBox: TShadowBox;
|
||||||
aRealItem: TMenuItem);
|
aRealItem: TMenuItem);
|
||||||
function GetWidth: integer; override;
|
function GetWidth: integer; override;
|
||||||
|
procedure Invalidate; override;
|
||||||
public
|
public
|
||||||
property BottomFake: TFake read GetBottomFake write FBottomFake;
|
property BottomFake: TFake read GetBottomFake write FBottomFake;
|
||||||
property IsInMenuBar: boolean read GetIsInMenuBar;
|
property IsInMenuBar: boolean read GetIsInMenuBar;
|
||||||
@ -2120,6 +2121,20 @@ begin
|
|||||||
Result:=w + Double_DropDown_Text_Offset + GetShortcutWidth + Add_Icon_Width;
|
Result:=w + Double_DropDown_Text_Offset + GetShortcutWidth + Add_Icon_Width;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TShadowItem.Invalidate;
|
||||||
|
var
|
||||||
|
OldHeight, NewHeight: Integer;
|
||||||
|
begin
|
||||||
|
OldHeight := Height;
|
||||||
|
NewHeight := GetHeight;
|
||||||
|
if OldHeight <> NewHeight then
|
||||||
|
begin
|
||||||
|
Height := NewHeight;
|
||||||
|
FParentBox.LocateShadows;
|
||||||
|
end;
|
||||||
|
inherited Invalidate;
|
||||||
|
end;
|
||||||
|
|
||||||
function TShadowItem.HasChildBox(out aChildBox: TShadowBoxBase): boolean;
|
function TShadowItem.HasChildBox(out aChildBox: TShadowBoxBase): boolean;
|
||||||
begin
|
begin
|
||||||
aChildBox:=nil;
|
aChildBox:=nil;
|
||||||
|
Loading…
Reference in New Issue
Block a user