Skip to content

Commit 979c89d

Browse files
committed
Adjust Calculator layout to responsive
1 parent 9965063 commit 979c89d

File tree

1 file changed

+52
-40
lines changed

1 file changed

+52
-40
lines changed
Lines changed: 52 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,70 @@
1-
<UserControl x:Class="Flow.Launcher.Plugin.Caculator.Views.CalculatorSettings"
2-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:ui="clr-namespace:Flow.Launcher.Infrastructure.UI;assembly=Flow.Launcher.Infrastructure"
7-
xmlns:calculator="clr-namespace:Flow.Launcher.Plugin.Caculator"
8-
xmlns:core="clr-namespace:Flow.Launcher.Core;assembly=Flow.Launcher.Core"
9-
xmlns:viewModels="clr-namespace:Flow.Launcher.Plugin.Caculator.ViewModels"
10-
mc:Ignorable="d"
11-
Loaded="CalculatorSettings_Loaded"
12-
d:DesignHeight="450" d:DesignWidth="800">
1+
<UserControl
2+
x:Class="Flow.Launcher.Plugin.Caculator.Views.CalculatorSettings"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:calculator="clr-namespace:Flow.Launcher.Plugin.Caculator"
6+
xmlns:core="clr-namespace:Flow.Launcher.Core;assembly=Flow.Launcher.Core"
7+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
xmlns:ui="clr-namespace:Flow.Launcher.Infrastructure.UI;assembly=Flow.Launcher.Infrastructure"
10+
xmlns:viewModels="clr-namespace:Flow.Launcher.Plugin.Caculator.ViewModels"
11+
d:DesignHeight="450"
12+
d:DesignWidth="800"
13+
Loaded="CalculatorSettings_Loaded"
14+
mc:Ignorable="d">
1315

1416
<UserControl.Resources>
15-
<core:LocalizationConverter x:Key="LocalizationConverter"/>
17+
<core:LocalizationConverter x:Key="LocalizationConverter" />
1618
</UserControl.Resources>
1719

18-
<Grid Margin="20 14 0 14">
20+
<Grid Margin="70,14,0,14">
1921
<Grid.RowDefinitions>
20-
<RowDefinition Height="auto"/>
21-
<RowDefinition Height="auto"/>
22+
<RowDefinition Height="auto" />
23+
<RowDefinition Height="auto" />
2224
</Grid.RowDefinitions>
2325
<Grid.ColumnDefinitions>
24-
<ColumnDefinition Width="*"/>
25-
<ColumnDefinition Width="3*"/>
26+
<ColumnDefinition Width="Auto" />
27+
<ColumnDefinition Width="3*" />
2628
</Grid.ColumnDefinitions>
2729

28-
<TextBlock Grid.Column="0" Grid.Row="0" Text="{DynamicResource flowlauncher_plugin_calculator_output_decimal_seperator}"
29-
VerticalAlignment="Center" FontSize="14"/>
30-
<ComboBox x:Name="DecimalSeparatorComboBox"
31-
Grid.Column="1"
32-
Grid.Row="0"
33-
Margin="10 5 0 5"
34-
HorizontalAlignment="Left"
35-
MaxWidth="300"
36-
SelectedItem="{Binding Settings.DecimalSeparator}"
37-
ItemsSource="{Binding Source={ui:EnumBindingSource {x:Type calculator:DecimalSeparator}}}">
30+
<TextBlock
31+
Grid.Row="0"
32+
Grid.Column="0"
33+
Margin="0,0,10,0"
34+
VerticalAlignment="Center"
35+
FontSize="14"
36+
Text="{DynamicResource flowlauncher_plugin_calculator_output_decimal_seperator}" />
37+
<ComboBox
38+
x:Name="DecimalSeparatorComboBox"
39+
Grid.Row="0"
40+
Grid.Column="1"
41+
MaxWidth="300"
42+
Margin="10,5,0,5"
43+
HorizontalAlignment="Left"
44+
ItemsSource="{Binding Source={ui:EnumBindingSource {x:Type calculator:DecimalSeparator}}}"
45+
SelectedItem="{Binding Settings.DecimalSeparator}">
3846
<ComboBox.ItemTemplate>
3947
<DataTemplate>
40-
<TextBlock Text="{Binding Converter={StaticResource LocalizationConverter}}" FontSize="14"/>
48+
<TextBlock FontSize="14" Text="{Binding Converter={StaticResource LocalizationConverter}}" />
4149
</DataTemplate>
4250
</ComboBox.ItemTemplate>
4351
</ComboBox>
4452

45-
<TextBlock Grid.Column="0" Grid.Row="1" Text="{DynamicResource flowlauncher_plugin_calculator_max_decimal_places}"
46-
VerticalAlignment="Center" FontSize="14"/>
47-
<ComboBox x:Name="MaxDecimalPlaces"
48-
Grid.Column="1"
49-
Grid.Row="1"
50-
Margin="10 5 0 5"
51-
HorizontalAlignment="Left"
52-
MaxWidth="300"
53-
SelectedItem="{Binding Settings.MaxDecimalPlaces}"
54-
ItemsSource="{Binding MaxDecimalPlacesRange}">
55-
</ComboBox>
53+
<TextBlock
54+
Grid.Row="1"
55+
Grid.Column="0"
56+
Margin="0,0,10,0"
57+
VerticalAlignment="Center"
58+
FontSize="14"
59+
Text="{DynamicResource flowlauncher_plugin_calculator_max_decimal_places}" />
60+
<ComboBox
61+
x:Name="MaxDecimalPlaces"
62+
Grid.Row="1"
63+
Grid.Column="1"
64+
Margin="10,5,0,5"
65+
HorizontalAlignment="Left"
66+
ItemsSource="{Binding MaxDecimalPlacesRange}"
67+
SelectedItem="{Binding Settings.MaxDecimalPlaces}" />
5668

5769
</Grid>
5870
</UserControl>

0 commit comments

Comments
 (0)