Skip to content

Commit 19622b7

Browse files
committed
Disable UseNative toggle on macOS
Give the ToggleButton a Name (UseNativeToggle) so it can be referenced from code-behind, and disable the control when Global.System == "macOS". This prevents the "UseNative" switch from being interactable on macOS where the native option is not supported.
1 parent 6efb920 commit 19622b7

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

UotanToolbox/Features/Settings/SettingsView.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
</DockPanel>
123123
<DockPanel>
124124
<ToggleButton VerticalAlignment="Top"
125+
Name="UseNativeToggle"
125126
Classes="Switch"
126127
DockPanel.Dock="Right"
127128
IsChecked="{Binding UseNative}" />

UotanToolbox/Features/Settings/SettingsView.axaml.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ private static string GetTranslation(string key)
1616
public SettingsView()
1717
{
1818
InitializeComponent();
19+
if (Global.System == "macOS")
20+
{
21+
UseNativeToggle.IsEnabled = false;
22+
}
1923
}
2024

2125
private static FilePickerFileType CsvPicker { get; } = new("CSV File")

0 commit comments

Comments
 (0)