Browse Source

Fixed OptionsPopup min width

flabbet 2 years ago
parent
commit
2f337e079b

+ 1 - 1
src/PixiEditor/Styles/ThemeStyle.xaml

@@ -101,7 +101,7 @@
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="Button">
-                    <Border CornerRadius="4" Background="{TemplateBinding Background}">
+                    <Border CornerRadius="4" Background="{TemplateBinding Background}" >
                         <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center"
                                           VerticalAlignment="Center" Margin="{TemplateBinding Padding}"/>
                     </Border>

+ 2 - 2
src/PixiEditor/Views/Dialogs/ConfirmationPopup.xaml

@@ -30,14 +30,14 @@
                     Margin="0,0,10,15">
             <Button Margin="10,0,10,0" MinWidth="70" IsDefault="True" Padding="5 0"
                     Command="{Binding Path=DataContext.SetResultAndCloseCommand, ElementName=popup}"
-                    Style="{StaticResource DarkRoundButton}" Content="{Binding ElementName=popup, Path=FirstOptionText}">
+                    Style="{StaticResource DarkRoundButton}" Content="{Binding Path=DataContext.FirstOptionText}">
                 <Button.CommandParameter>
                     <system:Boolean>True</system:Boolean>
                 </Button.CommandParameter>
             </Button>
             <Button MinWidth="70" Padding="5 0"
                     Command="{Binding Path=DataContext.SetResultAndCloseCommand, ElementName=popup}"
-                    Style="{StaticResource DarkRoundButton}" Content="{Binding ElementName=popup, Path=SecondOptionText}">
+                    Style="{StaticResource DarkRoundButton}" Content="{Binding Path=DataContext.SecondOptionText}">
                 <Button.CommandParameter>
                     <system:Boolean>False</system:Boolean>
                 </Button.CommandParameter>

+ 1 - 1
src/PixiEditor/Views/Dialogs/OptionsPopup.xaml

@@ -32,7 +32,7 @@
         <ItemsControl ItemsSource="{Binding Options, ElementName=popup}" Grid.Row="2" Margin="15">
             <ItemsControl.ItemTemplate>
                 <DataTemplate>
-                    <Button Content="{Binding}" Style="{StaticResource DarkRoundButton}" Margin="5,0"
+                    <Button Content="{Binding}" Style="{StaticResource DarkRoundButton}" MinWidth="70" Margin="5,0"
                             Command="{Binding CloseCommand, ElementName=popup}" CommandParameter="{Binding}"/>
                 </DataTemplate>
             </ItemsControl.ItemTemplate>