mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 10:39:20 +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 selMI.IsInMenuBar then begin
|
||||||
if (selShadow.Width > w) then
|
if (selShadow.Width > w) then
|
||||||
w:=selShadow.Width;
|
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.ShowingBottomFake:=True;
|
||||||
selShadow.BottomFake:=Self;
|
selShadow.BottomFake:=Self;
|
||||||
selShadow.ShowingRightFake:=False;
|
selShadow.ShowingRightFake:=False;
|
||||||
@ -585,7 +585,7 @@ end;
|
|||||||
|
|
||||||
procedure TFake.Paint;
|
procedure TFake.Paint;
|
||||||
var
|
var
|
||||||
r, TextRect: TRect;
|
r: TRect;
|
||||||
TextSize: TSize;
|
TextSize: TSize;
|
||||||
TextPoint, AddBmpPoint: TPoint;
|
TextPoint, AddBmpPoint: TPoint;
|
||||||
AddBmp: TCustomBitmap;
|
AddBmp: TCustomBitmap;
|
||||||
@ -600,9 +600,7 @@ begin
|
|||||||
if (TextPoint.y < 1) then
|
if (TextPoint.y < 1) then
|
||||||
TextPoint.y:=1;
|
TextPoint.y:=1;
|
||||||
TextPoint.x:=(r.Right - r.Left - TextSize.cx + AddBmp.Width) div 2;
|
TextPoint.x:=(r.Right - r.Left - TextSize.cx + AddBmp.Width) div 2;
|
||||||
TextRect := ClientRect;
|
Canvas.TextRect(r, TextPoint.x, TextPoint.y, Caption);
|
||||||
InflateRect(TextRect, 1, 1);
|
|
||||||
Canvas.TextRect(TextRect, TextPoint.x, TextPoint.y, Caption);
|
|
||||||
|
|
||||||
AddBmpPoint.x:=(TextPoint.x - AddBmp.Width) div 2;
|
AddBmpPoint.x:=(TextPoint.x - AddBmp.Width) div 2;
|
||||||
AddBmpPoint.y:=(r.Bottom - r.Top - AddBmp.Height) div 2;
|
AddBmpPoint.y:=(r.Bottom - r.Top - AddBmp.Height) div 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user