mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 01:02:15 +02:00
carbon: fix for StatusBar (status panels were not properly aligned). fix ExtTextOut function
git-svn-id: trunk@25234 -
This commit is contained in:
parent
19470fe5a8
commit
4880d7588a
@ -977,11 +977,7 @@ begin
|
||||
oCallbackStatus:=kATSULayoutOperationCallbackStatusHandled;
|
||||
|
||||
if Assigned(Buffer) then
|
||||
begin
|
||||
Handled := false;
|
||||
Buffer.DoJustify(iLineRef, Handled);
|
||||
if Handled then oCallbackStatus:=kATSULayoutOperationCallbackStatusHandled;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCarbonTextLayoutBuffer.DoJustify(iLineRef: ATSULineRef; var Handled: Boolean);
|
||||
@ -997,7 +993,6 @@ type
|
||||
TATSLayoutRecordArray = array [Word] of ATSLayoutRecord1;
|
||||
PATSLayoutRecordArray = ^TATSLayoutRecordArray;
|
||||
var
|
||||
Count : ItemCount;
|
||||
i, ofs : Integer;
|
||||
Layouts : PATSLayoutRecordArray;
|
||||
LayCount : ItemCount;
|
||||
@ -1009,7 +1004,7 @@ begin
|
||||
if Assigned(Layouts) and (Laycount>0) then
|
||||
begin
|
||||
ofs:=0;
|
||||
for i:=0 to Min(FDXCount, Min(LayCount, Count))-1 do
|
||||
for i:=0 to Min(FDXCount, LayCount)-1 do
|
||||
begin
|
||||
Layouts^[i].realPos:=Long2Fix(ofs);
|
||||
inc(ofs, FDX[i]);
|
||||
|
@ -1414,19 +1414,14 @@ begin
|
||||
if (I = AIndex) or (AIndex = -1) then // update panel attrs
|
||||
begin
|
||||
Panel.Width := StatusBar.Panels[I].Width;
|
||||
if I = StatusBar.Panels.Count - 1 then
|
||||
Panel.Align:=alClient
|
||||
else
|
||||
Panel.Align:=alLeft;
|
||||
Panel.Caption := StatusBar.Panels[I].Text;
|
||||
Panel.Alignment := StatusBar.Panels[I].Alignment;
|
||||
Panel.BevelOuter := TPanelBevel(StatusBar.Panels[I].Bevel);
|
||||
end;
|
||||
|
||||
// fit last panel
|
||||
if I < StatusBar.Panels.Count - 1 then
|
||||
Panel.Anchors := [akLeft, akTop, akBottom]
|
||||
else
|
||||
begin
|
||||
Panel.Width := StatusBar.Width - X;
|
||||
Panel.Anchors := [akLeft, akRight, akTop, akBottom];
|
||||
end;
|
||||
end;
|
||||
Panel.Show;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user