diff --git a/lcl/interfaces/carbon/carbongdiobjects.pp b/lcl/interfaces/carbon/carbongdiobjects.pp index c5f54d71fc..9e7c462b43 100644 --- a/lcl/interfaces/carbon/carbongdiobjects.pp +++ b/lcl/interfaces/carbon/carbongdiobjects.pp @@ -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]); diff --git a/lcl/interfaces/carbon/carbonprivate.pp b/lcl/interfaces/carbon/carbonprivate.pp index 725be815f8..61cb6b346f 100644 --- a/lcl/interfaces/carbon/carbonprivate.pp +++ b/lcl/interfaces/carbon/carbonprivate.pp @@ -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;