From 578d026520c6aef5aec7ea0bc5a3a7aea4b5a680 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 28 Jan 2025 10:55:01 +0100 Subject: [PATCH] IDE, SourceEditor: replace numeric (statusbar) panel index with named constant --- ide/sourceeditor.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ide/sourceeditor.pp b/ide/sourceeditor.pp index b8daa6a90f..052403e0fb 100644 --- a/ide/sourceeditor.pp +++ b/ide/sourceeditor.pp @@ -9063,9 +9063,9 @@ begin end; W := 0; for i := 0 to StatusBar.Panels.Count - 1 do - if i <> 5 then + if i <> CStatusPanelFile then w := w + StatusBar.Panels[i].Width; - StatusBar.Panels[5].Width := Max(150, StatusBar.Width - W); + StatusBar.Panels[CStatusPanelFile].Width := Max(150, StatusBar.Width - W); finally StatusBar.EndUpdate; end; @@ -9368,7 +9368,7 @@ begin Statusbar.Panels[CStatusPanelSel].Width := 100 else Statusbar.Panels[CStatusPanelSel].Width := 50; - Statusbar.Panels[5].Text := PanelFilename; + Statusbar.Panels[CStatusPanelFile].Text := PanelFilename; if(EditorMacroForRecording.IsRecording(CurEditor)) then Statusbar.Panels[CStatusPanelMacro].Width := IDEImages.ScaledSize(20) else