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