Browse Source

Enhance `FileSearchDialog` with icon addition and improved layout

- Added a search icon for better UI clarity.
- Adjusted `TextBox` padding and layout for alignment.
- Refined bindings to use localized strings for watermark text.
Ruben 4 days ago
parent
commit
66092d370a
1 changed files with 23 additions and 14 deletions
  1. 23 14
      src/PicView.Avalonia/Views/UC/PopUps/FileSearchDialog.axaml

+ 23 - 14
src/PicView.Avalonia/Views/UC/PopUps/FileSearchDialog.axaml

@@ -9,20 +9,29 @@
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <StackPanel Background="Transparent" Width="425">
     <StackPanel Background="Transparent" Width="425">
 
 
-        <TextBox
-            Background="{DynamicResource AltBackgroundColor}"
-            BorderBrush="{DynamicResource MainBorderColor}"
-            BorderThickness="1"
-            CornerRadius="3"
-            FontFamily="/Assets/Fonts/Roboto-Regular.ttf#Roboto"
-            Foreground="{DynamicResource MainTextColor}"
-            Margin="0,0,0,5"
-            Padding="5,6,0,6"
-            VerticalAlignment="Center"
-            Watermark="{CompiledBinding PicViewer.FileInfo.Value,
-                                        Mode=OneWay}"
-            Width="425"
-            x:Name="SearchBox" />
+        <Panel>
+            <Image
+                Height="16"
+                HorizontalAlignment="Left"
+                Margin="7,0,0,5"
+                Source="{StaticResource SearchImage}"
+                Width="16" />
+
+            <TextBox
+                Background="{DynamicResource AltBackgroundColor}"
+                BorderBrush="{DynamicResource MainBorderColor}"
+                BorderThickness="1"
+                CornerRadius="3"
+                FontFamily="/Assets/Fonts/Roboto-Regular.ttf#Roboto"
+                Foreground="{DynamicResource MainTextColor}"
+                Margin="0,0,0,5"
+                Padding="27,7,4,7"
+                VerticalAlignment="Center"
+                Watermark="{CompiledBinding Translation.Search.Value,
+                                            Mode=OneWay}"
+                Width="425"
+                x:Name="SearchBox" />
+        </Panel>
 
 
         <Border
         <Border
             BorderBrush="{DynamicResource MainBorderColor}"
             BorderBrush="{DynamicResource MainBorderColor}"