Skip to content

Commit 873bd82

Browse files
mherboldclaude
andcommitted
Move module settings beside the FFB graph and auto-fit the track map
The selected node's settings now stack in a scrollable column to the right of the node graph, the track map fills the bottom-right panel and scales to fit it, the effect-disabled notice moved below the node name, and the corner toolbars got opaque background plates. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent d7a69f9 commit 873bd82

4 files changed

Lines changed: 244 additions & 136 deletions

File tree

MarvinsAIRARefactored/Controls/FFBGraphEditor.xaml

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
<converters:BooleanToVisibilityCollapsedConverter x:Key="BoolToVisibilityCollapsed" />
2020
</UserControl.Resources>
2121

22-
<!-- Rounded on top only and no bottom border: the preview graph sits flush underneath (its top border is
22+
<!-- Rounded on the upper left only, no bottom border: the module settings column sits flush on the right
23+
(this box's right border is that divider) and the preview graph sits flush underneath (its top border is
2324
the 2px divider between them), so the two boxes read as one view. -->
2425
<Border BorderThickness="2,2,2,0"
2526
BorderBrush="{DynamicResource Brush.Border.Normal}"
2627
Background="{DynamicResource Brush.Background.Popup}"
27-
CornerRadius="5,5,0,0"
28+
CornerRadius="5,0,0,0"
2829
ClipToBounds="True">
2930

3031
<Grid>
@@ -262,36 +263,44 @@
262263

263264
<!-- canvas tools (pinned to the corner, outside the panned canvas): add module + remove selected module
264265
+ snap-to-grid toggle + auto layout -->
265-
<StackPanel Orientation="Horizontal"
266-
HorizontalAlignment="Right"
267-
VerticalAlignment="Top"
268-
Margin="0,8,8,0"
269-
Panel.ZIndex="1">
270-
271-
<local:MairaButton x:Name="AddModule_MairaButton"
272-
Icon="/MarvinsAIRARefactored;component/Artwork/Buttons/plus.png"
273-
IsSmall="True"
274-
Click="AddModule_MairaButton_Click" />
275-
276-
<local:MairaButton x:Name="RemoveModule_MairaButton"
277-
Icon="/MarvinsAIRARefactored;component/Artwork/Buttons/minus.png"
278-
IsSmall="True"
279-
Margin="8,0,0,0"
280-
Click="RemoveModule_MairaButton_Click" />
281-
282-
<local:MairaButton x:Name="SnapToGrid_MairaButton"
283-
Icon="/MarvinsAIRARefactored;component/Artwork/Buttons/grid.png"
284-
IsSmall="True"
285-
Margin="8,0,0,0"
286-
Click="SnapToGrid_MairaButton_Click" />
287-
288-
<local:MairaButton x:Name="AutoLayout_MairaButton"
289-
Icon="/MarvinsAIRARefactored;component/Artwork/Buttons/wand.png"
290-
IsSmall="True"
291-
Margin="8,0,0,0"
292-
Click="AutoLayout_MairaButton_Click" />
293-
294-
</StackPanel>
266+
<Border HorizontalAlignment="Right"
267+
VerticalAlignment="Top"
268+
Margin="0,8,8,0"
269+
Panel.ZIndex="1"
270+
Background="{DynamicResource Brush.Background.Default}"
271+
CornerRadius="20"
272+
Padding="6">
273+
274+
<!-- the rounded plate above is opaque (page background color) so the buttons stay readable
275+
over whatever nodes are underneath -->
276+
<StackPanel Orientation="Horizontal">
277+
278+
<local:MairaButton x:Name="AddModule_MairaButton"
279+
Icon="/MarvinsAIRARefactored;component/Artwork/Buttons/plus.png"
280+
IsSmall="True"
281+
Click="AddModule_MairaButton_Click" />
282+
283+
<local:MairaButton x:Name="RemoveModule_MairaButton"
284+
Icon="/MarvinsAIRARefactored;component/Artwork/Buttons/minus.png"
285+
IsSmall="True"
286+
Margin="8,0,0,0"
287+
Click="RemoveModule_MairaButton_Click" />
288+
289+
<local:MairaButton x:Name="SnapToGrid_MairaButton"
290+
Icon="/MarvinsAIRARefactored;component/Artwork/Buttons/grid.png"
291+
IsSmall="True"
292+
Margin="8,0,0,0"
293+
Click="SnapToGrid_MairaButton_Click" />
294+
295+
<local:MairaButton x:Name="AutoLayout_MairaButton"
296+
Icon="/MarvinsAIRARefactored;component/Artwork/Buttons/wand.png"
297+
IsSmall="True"
298+
Margin="8,0,0,0"
299+
Click="AutoLayout_MairaButton_Click" />
300+
301+
</StackPanel>
302+
303+
</Border>
295304

296305
</Grid>
297306

MarvinsAIRARefactored/FFB/FFBGraphViewModels.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,14 +427,16 @@ public bool IsTestActive
427427
public bool ShowInputA => _descriptor.SignalInputCount >= 1;
428428
public bool ShowInputB => _descriptor.SignalInputCount >= 2;
429429

430-
// the settings card's UniformGrid in RacingWheelPage.xaml consumes this via x:Static, so the BreakRow
431-
// spacer math here and the rendered column count always agree
430+
// column count for the multi-column settings-card presentation (the BreakRow spacer math below pads to
431+
// this). RacingWheelPage.xaml currently stacks the settings vertically and binds Settings directly, so
432+
// SettingsPresentation is unused there — kept in case the layout returns to a grid.
432433
public const int SettingsPanelColumns = 3;
433434

434435
public ObservableCollection<FFBModuleSettingViewModel> Settings { get; } = [];
435436

436-
/// <summary>What the settings panel actually renders: <see cref="Settings"/> plus invisible spacers padding
437-
/// out the row before each BreakRow setting, so related settings can be grouped onto their own row.</summary>
437+
/// <summary>The multi-column presentation of the settings: <see cref="Settings"/> plus invisible spacers
438+
/// padding out the row before each BreakRow setting, so related settings can be grouped onto their own
439+
/// row. Unused while the settings panel stacks vertically.</summary>
438440
public ObservableCollection<object> SettingsPresentation { get; } = [];
439441

440442
public string DisplayName

0 commit comments

Comments
 (0)