diff --git a/designer/menueditor.pp b/designer/menueditor.pp index 886331dafb..6be7d62d25 100644 --- a/designer/menueditor.pp +++ b/designer/menueditor.pp @@ -2451,9 +2451,9 @@ var r.Right:=ClientWidth; r.Left:=r.Right - MenuBar_Height; SetLength(pts, 4); - pts[0]:=Point(r.Left, 9); - pts[1]:=Point(r.Left + 4, 12); - pts[2]:=Point(r.Left, 15); + pts[0]:=Point(r.Left, ScaleY(9, 96)); + pts[1]:=Point(r.Left + ScaleX(4, 96), ScaleY(12, 96)); + pts[2]:=Point(r.Left, ScaleY(15, 96)); pts[3]:=pts[0]; oldBrushColor:=Canvas.Brush.Color; oldPenColor:=Canvas.Pen.Color; diff --git a/designer/menutemplates.pas b/designer/menutemplates.pas index 0607039ab6..bc8231d631 100644 --- a/designer/menutemplates.pas +++ b/designer/menutemplates.pas @@ -11,7 +11,7 @@ uses // LazUtils LazFileUtils, Laz2_XMLCfg, // IdeIntf - IDEDialogs, IDEImagesIntf, + IDEDialogs, // IDE LazarusIDEStrConsts, MenuShortcuts; @@ -274,15 +274,15 @@ end; procedure InitMenuBaseSizes; begin - MenuBar_Height := MulDiv(20, TIDEImages.GetScalePercent, 100); - Separator_Height := MulDiv(7, TIDEImages.GetScalePercent, 100); - Separator_Centre := MulDiv(3, TIDEImages.GetScalePercent, 100); - DropDown_Height := MulDiv(24, TIDEImages.GetScalePercent, 100); - MenuBar_Text_Offset := MulDiv(7, TIDEImages.GetScalePercent, 100); + MenuBar_Height := ScaleY(20, 96); + Separator_Height := ScaleY(7, 96); + Separator_Centre := ScaleY(3, 96); + DropDown_Height := ScaleY(24, 96); + MenuBar_Text_Offset := ScaleX(7, 96); Double_MenuBar_Text_Offset := MenuBar_Text_Offset shl 1; - DropDown_Text_Offset := MulDiv(35, TIDEImages.GetScalePercent, 100); + DropDown_Text_Offset := ScaleX(35, 96); Double_DropDown_Text_Offset := DropDown_Text_Offset shl 1; - Gutter_Offset := MulDiv(6, TIDEImages.GetScalePercent, 100); + Gutter_Offset := ScaleX(6, 96); Gutter_X := DropDown_Text_Offset - Gutter_Offset; end;