Flow.Launcher/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml
copilot-swe-agent[bot] 649b142b46 Add UseThousandsSeparator setting to Calculator plugin
Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com>
2026-01-10 06:30:57 +00:00

83 lines
3.4 KiB
XML

<UserControl
x:Class="Flow.Launcher.Plugin.Calculator.Views.CalculatorSettings"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:calculator="clr-namespace:Flow.Launcher.Plugin.Calculator"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewModels="clr-namespace:Flow.Launcher.Plugin.Calculator.ViewModels"
d:DataContext="{d:DesignInstance Type=viewModels:SettingsViewModel}"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<Grid Margin="{StaticResource SettingPanelMargin}">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="3*" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Row="0"
Grid.Column="0"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_calculator_output_decimal_separator}" />
<ComboBox
x:Name="DecimalSeparatorComboBox"
Grid.Row="0"
Grid.Column="1"
MaxWidth="300"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
DisplayMemberPath="Display"
ItemsSource="{Binding AllDecimalSeparator}"
SelectedValue="{Binding SelectedDecimalSeparator, Mode=TwoWay}"
SelectedValuePath="Value" />
<TextBlock
Grid.Row="1"
Grid.Column="0"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_calculator_max_decimal_places}" />
<ComboBox
x:Name="MaxDecimalPlaces"
Grid.Row="1"
Grid.Column="1"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
ItemsSource="{Binding MaxDecimalPlacesRange}"
SelectedItem="{Binding Settings.MaxDecimalPlaces}" />
<CheckBox
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Content="{DynamicResource flowlauncher_plugin_calculator_use_thousands_separator}"
IsChecked="{Binding Settings.UseThousandsSeparator, Mode=TwoWay}" />
<CheckBox
Grid.Row="3"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Content="{DynamicResource flowlauncher_plugin_calculator_show_error_message}"
IsChecked="{Binding Settings.ShowErrorMessage, Mode=TwoWay}" />
</Grid>
</UserControl>