Commit 57592af

Nick committed on
Fix row numbering for different font sizes
commit 57592afb39590379852e223755b7d0bde7502e50 parent bc8007e
2 changed files +43−41
Modifiedtracker.lfm +40−39
@@ -1,7 +1,7 @@
1 object frmTracker: TfrmTracker 1 object frmTracker: TfrmTracker
2 Left = 697 2 Left = 1941
3 Height = 643 3 Height = 643
4 Top = 216 4 Top = 294
5 Width = 1269 5 Width = 1269
6 AllowDropFiles = True 6 AllowDropFiles = True
7 Caption = 'hUGETracker' 7 Caption = 'hUGETracker'
@@ -61,15 +61,15 @@ object frmTracker: TfrmTracker
61 Height = 511 61 Height = 511
62 Top = 0 62 Top = 0
63 Width = 1071 63 Width = 1071
64 ActivePage = RoutinesTabSheet 64 ActivePage = PatternTabSheet
65 Align = alClient 65 Align = alClient
66 ParentFont = False 66 ParentFont = False
67 TabIndex = 5 67 TabIndex = 1
68 TabOrder = 0 68 TabOrder = 0
69 object GeneralTabSheet: TTabSheet 69 object GeneralTabSheet: TTabSheet
70 Caption = 'General' 70 Caption = 'General'
71 ClientHeight = 646 71 ClientHeight = 483
72 ClientWidth = 1064 72 ClientWidth = 1063
73 ParentFont = False 73 ParentFont = False
74 object SongInformationGroupbox: TGroupBox 74 object SongInformationGroupbox: TGroupBox
75 Left = 8 75 Left = 8
@@ -145,17 +145,17 @@ object frmTracker: TfrmTracker
145 end 145 end
146 object PatternTabSheet: TTabSheet 146 object PatternTabSheet: TTabSheet
147 Caption = 'Patterns' 147 Caption = 'Patterns'
148 ClientHeight = 646 148 ClientHeight = 483
149 ClientWidth = 1064 149 ClientWidth = 1063
150 ParentFont = False 150 ParentFont = False
151 object Panel3: TPanel 151 object Panel3: TPanel
152 Left = 224 152 Left = 224
153 Height = 646 153 Height = 483
154 Top = 0 154 Top = 0
155 Width = 840 155 Width = 839
156 Align = alClient 156 Align = alClient
157 ClientHeight = 646 157 ClientHeight = 483
158 ClientWidth = 840 158 ClientWidth = 839
159 ParentFont = False 159 ParentFont = False
160 TabOrder = 0 160 TabOrder = 0
161 object HeaderControl1: THeaderControl 161 object HeaderControl1: THeaderControl
@@ -163,7 +163,7 @@ object frmTracker: TfrmTracker
163 Height = 30 163 Height = 30
164 Hint = 'Left click to mute, right click to solo' 164 Hint = 'Left click to mute, right click to solo'
165 Top = 1 165 Top = 1
166 Width = 838 166 Width = 837
167 DragReorder = False 167 DragReorder = False
168 Images = ImageList2 168 Images = ImageList2
169 Sections = < 169 Sections = <
@@ -208,27 +208,28 @@ object frmTracker: TfrmTracker
208 end 208 end
209 object ScrollBox1: TScrollBox 209 object ScrollBox1: TScrollBox
210 Left = 1 210 Left = 1
211 Height = 614 211 Height = 451
212 Top = 31 212 Top = 31
213 Width = 838 213 Width = 837
214 HorzScrollBar.Increment = 5 214 HorzScrollBar.Increment = 3
215 HorzScrollBar.Page = 56 215 HorzScrollBar.Page = 32
216 HorzScrollBar.Smooth = True 216 HorzScrollBar.Smooth = True
217 HorzScrollBar.Tracking = True 217 HorzScrollBar.Tracking = True
218 VertScrollBar.Page = 88 218 VertScrollBar.Increment = 5
219 VertScrollBar.Page = 50
219 VertScrollBar.Smooth = True 220 VertScrollBar.Smooth = True
220 VertScrollBar.Tracking = True 221 VertScrollBar.Tracking = True
221 Align = alClient 222 Align = alClient
222 BorderStyle = bsNone 223 BorderStyle = bsNone
223 ClientHeight = 614 224 ClientHeight = 451
224 ClientWidth = 838 225 ClientWidth = 837
225 ParentFont = False 226 ParentFont = False
226 TabOrder = 1 227 TabOrder = 1
227 OnMouseWheelDown = ScrollBox1MouseWheelDown 228 OnMouseWheelDown = ScrollBox1MouseWheelDown
228 OnMouseWheelUp = ScrollBox1MouseWheelUp 229 OnMouseWheelUp = ScrollBox1MouseWheelUp
229 object RowNumberStringGrid: TStringGrid 230 object RowNumberStringGrid: TStringGrid
230 Left = 0 231 Left = 0
231 Height = 614 232 Height = 451
232 Top = 0 233 Top = 0
233 Width = 32 234 Width = 32
234 Align = alLeft 235 Align = alLeft
@@ -245,7 +246,7 @@ object frmTracker: TfrmTracker
245 end 246 end
246 object OrderEditStringGrid: TStringGrid 247 object OrderEditStringGrid: TStringGrid
247 Left = 0 248 Left = 0
248 Height = 646 249 Height = 483
249 Top = 0 250 Top = 0
250 Width = 224 251 Width = 224
251 Align = alLeft 252 Align = alLeft
@@ -1722,7 +1723,7 @@ object frmTracker: TfrmTracker
1722 ParentShowHint = False 1723 ParentShowHint = False
1723 end 1724 end
1724 object PanicToolButton: TToolButton 1725 object PanicToolButton: TToolButton
1725 Left = 551 1726 Left = 557
1726 Hint = 'Stops all sound output' 1727 Hint = 'Stops all sound output'
1727 Top = 0 1728 Top = 0
1728 AutoSize = True 1729 AutoSize = True
@@ -1733,17 +1734,17 @@ object frmTracker: TfrmTracker
1733 ShowHint = True 1734 ShowHint = True
1734 end 1735 end
1735 object ToolButton2: TToolButton 1736 object ToolButton2: TToolButton
1736 Left = 145 1737 Left = 147
1737 Top = 0 1738 Top = 0
1738 Action = PlayCursorAction 1739 Action = PlayCursorAction
1739 end 1740 end
1740 object ToolButton4: TToolButton 1741 object ToolButton4: TToolButton
1741 Left = 219 1742 Left = 221
1742 Top = 0 1743 Top = 0
1743 Action = StopAction 1744 Action = StopAction
1744 end 1745 end
1745 object ExportGBButton: TToolButton 1746 object ExportGBButton: TToolButton
1746 Left = 287 1747 Left = 291
1747 Hint = 'Export the song as a standalone ROM' 1748 Hint = 'Export the song as a standalone ROM'
1748 Top = 0 1749 Top = 0
1749 AutoSize = True 1750 AutoSize = True
@@ -1759,21 +1760,21 @@ object frmTracker: TfrmTracker
1759 Style = tbsDivider 1760 Style = tbsDivider
1760 end 1761 end
1761 object ToolButton6: TToolButton 1762 object ToolButton6: TToolButton
1762 Left = 284 1763 Left = 286
1763 Height = 22 1764 Height = 22
1764 Top = 0 1765 Top = 0
1765 Caption = 'ToolButton6' 1766 Caption = 'ToolButton6'
1766 Style = tbsDivider 1767 Style = tbsDivider
1767 end 1768 end
1768 object ToolButton7: TToolButton 1769 object ToolButton7: TToolButton
1769 Left = 1088 1770 Left = 1097
1770 Height = 22 1771 Height = 22
1771 Top = 0 1772 Top = 0
1772 Caption = 'ToolButton7' 1773 Caption = 'ToolButton7'
1773 Style = tbsSeparator 1774 Style = tbsSeparator
1774 end 1775 end
1775 object OctaveSpinEdit: TSpinEdit 1776 object OctaveSpinEdit: TSpinEdit
1776 Left = 654 1777 Left = 663
1777 Height = 23 1778 Height = 23
1778 Hint = 'The octave offset for entering new notes' 1779 Hint = 'The octave offset for entering new notes'
1779 Top = 0 1780 Top = 0
@@ -1784,14 +1785,14 @@ object frmTracker: TfrmTracker
1784 TabOrder = 0 1785 TabOrder = 0
1785 end 1786 end
1786 object ToolButton9: TToolButton 1787 object ToolButton9: TToolButton
1787 Left = 606 1788 Left = 612
1788 Height = 22 1789 Height = 22
1789 Top = 0 1790 Top = 0
1790 Caption = 'ToolButton9' 1791 Caption = 'ToolButton9'
1791 Style = tbsSeparator 1792 Style = tbsSeparator
1792 end 1793 end
1793 object Label22: TLabel 1794 object Label22: TLabel
1794 Left = 611 1795 Left = 620
1795 Height = 22 1796 Height = 22
1796 Top = 0 1797 Top = 0
1797 Width = 43 1798 Width = 43
@@ -1802,7 +1803,7 @@ object frmTracker: TfrmTracker
1802 ParentFont = False 1803 ParentFont = False
1803 end 1804 end
1804 object Label23: TLabel 1805 object Label23: TLabel
1805 Left = 719 1806 Left = 728
1806 Height = 22 1807 Height = 22
1807 Top = 0 1808 Top = 0
1808 Width = 70 1809 Width = 70
@@ -1813,7 +1814,7 @@ object frmTracker: TfrmTracker
1813 ParentFont = False 1814 ParentFont = False
1814 end 1815 end
1815 object InstrumentComboBox: TComboBox 1816 object InstrumentComboBox: TComboBox
1816 Left = 789 1817 Left = 798
1817 Height = 23 1818 Height = 23
1818 Hint = 'The selected instrument for new notes' 1819 Hint = 'The selected instrument for new notes'
1819 Top = 0 1820 Top = 0
@@ -1831,7 +1832,7 @@ object frmTracker: TfrmTracker
1831 Text = '(no instrument)' 1832 Text = '(no instrument)'
1832 end 1833 end
1833 object Label24: TLabel 1834 object Label24: TLabel
1834 Left = 1003 1835 Left = 1012
1835 Height = 22 1836 Height = 22
1836 Top = 0 1837 Top = 0
1837 Width = 35 1838 Width = 35
@@ -1842,7 +1843,7 @@ object frmTracker: TfrmTracker
1842 ParentFont = False 1843 ParentFont = False
1843 end 1844 end
1844 object StepSpinEdit: TSpinEdit 1845 object StepSpinEdit: TSpinEdit
1845 Left = 1038 1846 Left = 1047
1846 Height = 23 1847 Height = 23
1847 Hint = 'How many rows to step down after entering a new note' 1848 Hint = 'How many rows to step down after entering a new note'
1848 Top = 0 1849 Top = 0
@@ -1853,12 +1854,12 @@ object frmTracker: TfrmTracker
1853 TabOrder = 2 1854 TabOrder = 2
1854 end 1855 end
1855 object ToolButton3: TToolButton 1856 object ToolButton3: TToolButton
1856 Left = 82 1857 Left = 84
1857 Top = 0 1858 Top = 0
1858 Action = PlayStartAction 1859 Action = PlayStartAction
1859 end 1860 end
1860 object ExportGBSButton: TToolButton 1861 object ExportGBSButton: TToolButton
1861 Left = 368 1862 Left = 372
1862 Hint = 'Export the song as a GBS soundtrack' 1863 Hint = 'Export the song as a GBS soundtrack'
1863 Top = 0 1864 Top = 0
1864 Caption = 'Export .GBS' 1865 Caption = 'Export .GBS'
@@ -1866,14 +1867,14 @@ object frmTracker: TfrmTracker
1866 OnClick = ExportGBSButtonClick 1867 OnClick = ExportGBSButtonClick
1867 end 1868 end
1868 object ToolButton5: TToolButton 1869 object ToolButton5: TToolButton
1869 Left = 548 1870 Left = 552
1870 Height = 22 1871 Height = 22
1871 Top = 0 1872 Top = 0
1872 Caption = 'ToolButton5' 1873 Caption = 'ToolButton5'
1873 Style = tbsDivider 1874 Style = tbsDivider
1874 end 1875 end
1875 object ToolButton10: TToolButton 1876 object ToolButton10: TToolButton
1876 Left = 455 1877 Left = 459
1877 Hint = 'Export the song as WAV or MP3' 1878 Hint = 'Export the song as WAV or MP3'
1878 Top = 0 1879 Top = 0
1879 Caption = 'Render Song' 1880 Caption = 'Render Song'
Modifiedtracker.pas +3−2
@@ -1041,9 +1041,8 @@ begin
1041 TrackerGrid.OnResize:=@OnTrackerGridResize; 1041 TrackerGrid.OnResize:=@OnTrackerGridResize;
1042 TrackerGrid.OnCursorOutOfBounds:=@OnTrackerGridCursorOutOfBounds; 1042 TrackerGrid.OnCursorOutOfBounds:=@OnTrackerGridCursorOutOfBounds;
1043 TrackerGrid.Left := RowNumberStringGrid.Left + RowNumberStringGrid.Width; 1043 TrackerGrid.Left := RowNumberStringGrid.Left + RowNumberStringGrid.Width;
1044 RowNumberStringGrid.DefaultRowHeight := TrackerGrid.RowHeight;
1045
1046 TrackerGrid.FontSize := TrackerSettings.PatternEditorFontSize; 1044 TrackerGrid.FontSize := TrackerSettings.PatternEditorFontSize;
1045 RowNumberStringGrid.DefaultRowHeight := TrackerGrid.RowHeight;
1047 ScopesOn := TrackerSettings.UseScopes; 1046 ScopesOn := TrackerSettings.UseScopes;
1048 1047
1049 // Fix the size of the channel headers 1048 // Fix the size of the channel headers
@@ -2127,6 +2126,8 @@ begin
2127 frmOptions.ShowModal; 2126 frmOptions.ShowModal;
2128 2127
2129 TrackerGrid.FontSize := TrackerSettings.PatternEditorFontSize; 2128 TrackerGrid.FontSize := TrackerSettings.PatternEditorFontSize;
2129 RowNumberStringGrid.DefaultRowHeight := TrackerGrid.RowHeight;
2130
2130 ScopesOn := TrackerSettings.UseScopes; 2131 ScopesOn := TrackerSettings.UseScopes;
2131 2132
2132 OscilloscopeUpdateTimer.Enabled := ScopesOn; 2133 OscilloscopeUpdateTimer.Enabled := ScopesOn;