Commit 507f081

Nick Faro committed on
Re-design subpattern UI
commit 507f08188114e1c9309f2b0d1c5b4ab18960ec7a parent 575d9c4
2 changed files +66−66
Modifiedtracker.lfm +53−59
@@ -1,7 +1,7 @@
1 object frmTracker: TfrmTracker 1 object frmTracker: TfrmTracker
2 Left = 651 2 Left = 1181
3 Height = 902 3 Height = 902
4 Top = 282 4 Top = 246
5 Width = 1458 5 Width = 1458
6 AllowDropFiles = True 6 AllowDropFiles = True
7 Caption = 'hUGETracker' 7 Caption = 'hUGETracker'
@@ -315,10 +315,10 @@ object frmTracker: TfrmTracker
315 ParentFont = False 315 ParentFont = False
316 object FlowPanel1: TFlowPanel 316 object FlowPanel1: TFlowPanel
317 Left = 0 317 Left = 0
318 Height = 695 318 Height = 742
319 Top = 0 319 Top = 0
320 Width = 1252 320 Width = 943
321 Align = alTop 321 Align = alClient
322 AutoSize = True 322 AutoSize = True
323 BevelOuter = bvNone 323 BevelOuter = bvNone
324 ControlList = < 324 ControlList = <
@@ -346,11 +346,6 @@ object frmTracker: TfrmTracker
346 Control = NoiseGroupBox 346 Control = NoiseGroupBox
347 WrapAfter = waAuto 347 WrapAfter = waAuto
348 Index = 4 348 Index = 4
349 end
350 item
351 Control = TableGroupBox
352 WrapAfter = waAuto
353 Index = 5
354 end> 349 end>
355 FlowLayout = tlTop 350 FlowLayout = tlTop
356 FlowStyle = fsLeftRightTopBottom 351 FlowStyle = fsLeftRightTopBottom
@@ -673,9 +668,9 @@ object frmTracker: TfrmTracker
673 end 668 end
674 end 669 end
675 object SquareGroupBox: TGroupBox 670 object SquareGroupBox: TGroupBox
676 Left = 897 671 Left = 7
677 Height = 169 672 Height = 169
678 Top = 7 673 Top = 294
679 Width = 319 674 Width = 319
680 Anchors = [] 675 Anchors = []
681 BorderSpacing.Left = 7 676 BorderSpacing.Left = 7
@@ -800,7 +795,7 @@ object frmTracker: TfrmTracker
800 end 795 end
801 end 796 end
802 object WaveGroupBox: TGroupBox 797 object WaveGroupBox: TGroupBox
803 Left = 7 798 Left = 340
804 Height = 169 799 Height = 169
805 Top = 294 800 Top = 294
806 Width = 297 801 Width = 297
@@ -907,9 +902,9 @@ object frmTracker: TfrmTracker
907 end 902 end
908 end 903 end
909 object NoiseGroupBox: TGroupBox 904 object NoiseGroupBox: TGroupBox
910 Left = 318 905 Left = 7
911 Height = 223 906 Height = 223
912 Top = 294 907 Top = 477
913 Width = 397 908 Width = 397
914 Anchors = [] 909 Anchors = []
915 BorderSpacing.Left = 7 910 BorderSpacing.Left = 7
@@ -957,52 +952,51 @@ object frmTracker: TfrmTracker
957 end 952 end
958 end 953 end
959 end 954 end
960 object TableGroupBox: TGroupBox 955 end
961 Left = 729 956 object GroupBox1: TGroupBox
962 Height = 394 957 Left = 943
963 Top = 294 958 Height = 735
964 Width = 327 959 Top = 7
965 Anchors = [] 960 Width = 309
966 BorderSpacing.Left = 7 961 Align = alRight
967 BorderSpacing.Top = 7 962 Anchors = []
968 BorderSpacing.Right = 7 963 BorderSpacing.Top = 7
969 BorderSpacing.Bottom = 7 964 Caption = 'Subpattern'
970 Caption = 'Subpattern' 965 ClientHeight = 715
971 ClientHeight = 374 966 ClientWidth = 305
972 ClientWidth = 323 967 TabOrder = 1
973 TabOrder = 5 968 object ScrollBox2: TScrollBox
974 object ScrollBox2: TScrollBox 969 Left = 0
975 Left = 0 970 Height = 715
976 Height = 374 971 Top = 0
972 Width = 305
973 HorzScrollBar.Increment = 3
974 HorzScrollBar.Page = 32
975 HorzScrollBar.Smooth = True
976 HorzScrollBar.Tracking = True
977 VertScrollBar.Increment = 5
978 VertScrollBar.Page = 50
979 VertScrollBar.Smooth = True
980 VertScrollBar.Tracking = True
981 Align = alClient
982 BorderStyle = bsNone
983 ClientHeight = 715
984 ClientWidth = 305
985 TabOrder = 0
986 object RowNumberStringGrid1: TStringGrid
987 Left = 273
988 Height = 715
977 Top = 0 989 Top = 0
978 Width = 323 990 Width = 32
979 HorzScrollBar.Increment = 3 991 Align = alRight
980 HorzScrollBar.Page = 32 992 BorderStyle = bsNone
981 HorzScrollBar.Smooth = True 993 ColCount = 1
982 HorzScrollBar.Tracking = True 994 DefaultColWidth = 32
983 VertScrollBar.Increment = 5 995 Enabled = False
984 VertScrollBar.Page = 50 996 ParentFont = False
985 VertScrollBar.Smooth = True 997 RowCount = 64
986 VertScrollBar.Tracking = True 998 ScrollBars = ssNone
987 Align = alClient
988 ClientHeight = 370
989 ClientWidth = 319
990 TabOrder = 0 999 TabOrder = 0
991 object RowNumberStringGrid1: TStringGrid
992 Left = 0
993 Height = 370
994 Top = 0
995 Width = 32
996 Align = alLeft
997 BorderStyle = bsNone
998 ColCount = 1
999 DefaultColWidth = 32
1000 Enabled = False
1001 ParentFont = False
1002 RowCount = 64
1003 ScrollBars = ssNone
1004 TabOrder = 0
1005 end
1006 end 1000 end
1007 end 1001 end
1008 end 1002 end
Modifiedtracker.pas +13−7
@@ -28,9 +28,9 @@ type
28 TfrmTracker = class(TForm) 28 TfrmTracker = class(TForm)
29 CheckBox1: TCheckBox; 29 CheckBox1: TCheckBox;
30 DecreaseOctaveAction: TAction; 30 DecreaseOctaveAction: TAction;
31 GroupBox1: TGroupBox;
31 RowNumberStringGrid1: TStringGrid; 32 RowNumberStringGrid1: TStringGrid;
32 ScrollBox2: TScrollBox; 33 ScrollBox2: TScrollBox;
33 TableGroupBox: TGroupBox;
34 IncreaseOctaveAction: TAction; 34 IncreaseOctaveAction: TAction;
35 IncrementCurrentInstrumentAction: TAction; 35 IncrementCurrentInstrumentAction: TAction;
36 DecrementCurrentInstrumentAction: TAction; 36 DecrementCurrentInstrumentAction: TAction;
@@ -1130,8 +1130,8 @@ begin
1130 TrackerGrid := TTrackerGrid.Create(Self, ScrollBox1, Song.Patterns, 4); 1130 TrackerGrid := TTrackerGrid.Create(Self, ScrollBox1, Song.Patterns, 4);
1131 TrackerGrid.OnResize:=@OnTrackerGridResize; 1131 TrackerGrid.OnResize:=@OnTrackerGridResize;
1132 TrackerGrid.OnCursorOutOfBounds:=@OnTrackerGridCursorOutOfBounds; 1132 TrackerGrid.OnCursorOutOfBounds:=@OnTrackerGridCursorOutOfBounds;
1133 TrackerGrid.Left := RowNumberStringGrid.Left + RowNumberStringGrid.Width;
1134 TrackerGrid.FontSize := TrackerSettings.PatternEditorFontSize; 1133 TrackerGrid.FontSize := TrackerSettings.PatternEditorFontSize;
1134 TrackerGrid.Left := RowNumberStringGrid.Left + RowNumberStringGrid.Width;
1135 RowNumberStringGrid.DefaultRowHeight := TrackerGrid.RowHeight; 1135 RowNumberStringGrid.DefaultRowHeight := TrackerGrid.RowHeight;
1136 ScopesOn := TrackerSettings.UseScopes; 1136 ScopesOn := TrackerSettings.UseScopes;
1137 1137
@@ -1143,9 +1143,10 @@ begin
1143 1143
1144 if Assigned(TableGrid) then TableGrid.Free; 1144 if Assigned(TableGrid) then TableGrid.Free;
1145 TableGrid := TTableGrid.Create(Self, ScrollBox2, Song.Patterns, 1); 1145 TableGrid := TTableGrid.Create(Self, ScrollBox2, Song.Patterns, 1);
1146 TableGrid.Left := RowNumberStringGrid1.Left + RowNumberStringGrid1.Width; 1146
1147 TableGrid.FontSize := TrackerSettings.PatternEditorFontSize; 1147 TableGrid.FontSize := TrackerSettings.PatternEditorFontSize;
1148 RowNumberStringGrid1.DefaultRowHeight := TrackerGrid.RowHeight; 1148 RowNumberStringGrid1.DefaultRowHeight := TrackerGrid.RowHeight;
1149 TableGrid.Left := RowNumberStringGrid1.Left - TableGrid.Width;
1149 end; 1150 end;
1150 1151
1151 procedure TfrmTracker.RecreateRowNumbers; 1152 procedure TfrmTracker.RecreateRowNumbers;
@@ -1153,12 +1154,17 @@ var
1153 I: Integer; 1154 I: Integer;
1154 begin 1155 begin
1155 RowNumberStringGrid.Clean; 1156 RowNumberStringGrid.Clean;
1157 RowNumberStringGrid1.Clean;
1156 // Add the row numbers to the string grid 1158 // Add the row numbers to the string grid
1157 for I := 0 to RowNumberStringGrid.RowCount-1 do begin 1159 for I := 0 to RowNumberStringGrid.RowCount-1 do begin
1158 if TrackerSettings.DisplayRowNumbersAsHex then 1160 if TrackerSettings.DisplayRowNumbersAsHex then begin
1159 RowNumberStringGrid.Cells[0, I] := IntToHex(I, 2) 1161 RowNumberStringGrid.Cells[0, I] := IntToHex(I, 2);
1160 else 1162 RowNumberStringGrid1.Cells[0, I] := IntToHex(I, 2)
1161 RowNumberStringGrid.Cells[0, I] := IntToStr(I) 1163 end
1164 else begin
1165 RowNumberStringGrid.Cells[0, I] := IntToStr(I);
1166 RowNumberStringGrid1.Cells[0, I] := IntToStr(I)
1167 end;
1162 end; 1168 end;
1163 end; 1169 end;
1164 1170