mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-19 22:29:37 +01:00
parent
7e8b3df07f
commit
727c3782d1
@ -569,7 +569,9 @@ var
|
||||
function TitleSize: Integer;
|
||||
begin
|
||||
if not Title.Visible or (Title.Caption = '') then exit(0);
|
||||
Result := TPointBoolArr(Title.MeasureLabel(d, Title.Caption))[not v];
|
||||
// Workaround for issue #19780, fix after upgrade to FPC 2.6.
|
||||
with Title.MeasureLabel(d, Title.Caption) do
|
||||
Result := IfThen(v, cx, cy);
|
||||
if Title.DistanceToCenter then
|
||||
Result := Result div 2;
|
||||
Result += d.Scale(Title.Distance);
|
||||
@ -579,8 +581,9 @@ var
|
||||
var
|
||||
sz, fm, lm: Integer;
|
||||
begin
|
||||
sz := TPointBoolArr(
|
||||
Marks.MeasureLabel(d, FMarkValues[AIndex].FText))[v] div 2;
|
||||
// Workaround for issue #19780, fix after upgrade to FPC 2.6.
|
||||
with Marks.MeasureLabel(d, FMarkValues[AIndex].FText) do
|
||||
sz := IfThen(v, cy, cx) div 2;
|
||||
fm := sz - ACoord + ARMin;
|
||||
lm := sz - ARMax + ACoord;
|
||||
if v then
|
||||
|
||||
@ -530,8 +530,9 @@ begin
|
||||
Result := 0;
|
||||
if not Visible then exit;
|
||||
for t in AValues do
|
||||
Result := Max(
|
||||
TPointBoolArr(MeasureLabel(ADrawer, t.FText))[AIsVertical], Result);
|
||||
// Workaround for issue #19780, fix after upgrade to FPC 2.6.
|
||||
with MeasureLabel(ADrawer, t.FText) do
|
||||
Result := Max(IfThen(AIsVertical, cy, cx), Result);
|
||||
if Result = 0 then exit;
|
||||
if DistanceToCenter then
|
||||
Result := Result div 2;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user