mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 02:22:19 +02:00
MenuEditor: Fixed drawing of AddSubmenuFake on GTK2.
git-svn-id: trunk@55394 -
This commit is contained in:
parent
79a3a03c3e
commit
8604d5a860
@ -491,7 +491,7 @@ begin
|
||||
if selMI.IsInMenuBar then begin
|
||||
if (selShadow.Width > w) then
|
||||
w:=selShadow.Width;
|
||||
SetBounds(selShadow.Left, MenuBar_Height + 1, w, MenuBar_Height);
|
||||
SetBounds(selShadow.Left, MenuBar_Height + 1, w, DropDown_Height);
|
||||
selShadow.ShowingBottomFake:=True;
|
||||
selShadow.BottomFake:=Self;
|
||||
selShadow.ShowingRightFake:=False;
|
||||
@ -585,7 +585,7 @@ end;
|
||||
|
||||
procedure TFake.Paint;
|
||||
var
|
||||
r, TextRect: TRect;
|
||||
r: TRect;
|
||||
TextSize: TSize;
|
||||
TextPoint, AddBmpPoint: TPoint;
|
||||
AddBmp: TCustomBitmap;
|
||||
@ -600,9 +600,7 @@ begin
|
||||
if (TextPoint.y < 1) then
|
||||
TextPoint.y:=1;
|
||||
TextPoint.x:=(r.Right - r.Left - TextSize.cx + AddBmp.Width) div 2;
|
||||
TextRect := ClientRect;
|
||||
InflateRect(TextRect, 1, 1);
|
||||
Canvas.TextRect(TextRect, TextPoint.x, TextPoint.y, Caption);
|
||||
Canvas.TextRect(r, TextPoint.x, TextPoint.y, Caption);
|
||||
|
||||
AddBmpPoint.x:=(TextPoint.x - AddBmp.Width) div 2;
|
||||
AddBmpPoint.y:=(r.Bottom - r.Top - AddBmp.Height) div 2;
|
||||
|
Loading…
Reference in New Issue
Block a user