Browse Source

Changed tool picker

Krzysztof Krysiński 1 year ago
parent
commit
acf6fe5e39

+ 1 - 1
src/PixiEditor.AvaloniaUI/Styles/ToolPickerButton.Styles.axaml

@@ -5,7 +5,7 @@
 
     <Styles.Resources>
         <Color x:Key="SelectedToolBorderColor">#fff</Color>
-        <CornerRadius x:Key="SelectedToolCornerRadius">50</CornerRadius>
+        <CornerRadius x:Key="SelectedToolCornerRadius">5</CornerRadius>
         <SolidColorBrush x:Key="SelectedToolBorderBrush" Color="{StaticResource SelectedToolBorderColor}"/>
     </Styles.Resources>
 

+ 4 - 1
src/PixiEditor.AvaloniaUI/Views/Main/Tools/ToolsPicker.axaml

@@ -10,7 +10,10 @@
              xmlns:tools1="clr-namespace:PixiEditor.AvaloniaUI.Views.Main.Tools"
              mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
              x:Class="PixiEditor.AvaloniaUI.Views.Main.ToolsPicker" Name="picker">
-    <Border CornerRadius="100" Background="{DynamicResource ThemeBackgroundBrush1}">
+    <Border CornerRadius="{DynamicResource ControlCornerRadius}"
+            BorderBrush="{DynamicResource ThemeBorderMidBrush}"
+            BorderThickness="{DynamicResource ThemeBorderThickness}"
+            Background="{DynamicResource ThemeBackgroundBrush1}">
         <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
         <ItemsControl ItemsSource="{Binding ElementName=picker, Path=Tools}" Padding="0 10">
             <ItemsControl.ItemTemplate>

+ 0 - 3
src/PixiEditor.AvaloniaUI/Views/Shortcuts/KeyCombinationBox.axaml.cs

@@ -89,7 +89,6 @@ internal partial class KeyCombinationBox : UserControl
         {
             KeyCombination = new(e.Key, currentCombination.Modifiers);
             focusGrid.Focus();
-            //Keyboard.ClearFocus();
         }
 
         UpdateButton();
@@ -104,14 +103,12 @@ internal partial class KeyCombinationBox : UserControl
 
     private void TextBox_LostKeyboardFocus(object sender, RoutedEventArgs e)
     {
-        // TODO: Validate if right
         ignoreButtonPress = TopLevel.GetTopLevel(this).FocusManager.GetFocusedElement() == button;
         currentCombination = KeyCombination;
 
         UpdateText();
         UpdateButton();
         focusGrid.Focus();
-        //FocusHelper.MoveFocusToParent((FrameworkElement)sender);
     }
 
     private void Button_Click(object sender, RoutedEventArgs e)