[Projects] Adding Edit button to the popup. + minor changes

This commit is contained in:
donlaci
2024-06-19 15:17:25 +02:00
parent 90979cbecb
commit 01d6c916d6
3 changed files with 55 additions and 18 deletions

View File

@@ -101,12 +101,14 @@
Text="{Binding SearchTerm, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Background="{DynamicResource SecondaryBackgroundBrush}"
BorderBrush="{DynamicResource PrimaryBorderBrush}"
ToolTip="{x:Static props:Resources.SearchExplanation}"
/>
<TextBlock
IsHitTestVisible="False"
Text="{x:Static props:Resources.Search}"
VerticalAlignment="Center"
Foreground="{DynamicResource SecondaryForegroundBrush}"
ToolTip="{x:Static props:Resources.SearchExplanation}"
Margin="10,0,0,0">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
@@ -123,7 +125,7 @@
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
Margin="-24,0,10,0"
Margin="-50,0,34,0"
AutomationProperties.Name="{x:Static props:Resources.Search}"
FontFamily="{DynamicResource SymbolThemeFontFamily}"
Foreground="{DynamicResource SecondaryForegroundBrush}"
@@ -243,23 +245,46 @@
StaysOpen="False"
PlacementTarget="{Binding ElementName=MoreButton}"
Placement="Left">
<Button
Style="{StaticResource DeleteButtonStyle}"
AutomationProperties.Name="{x:Static props:Resources.Delete}"
Click="DeleteButtonClicked">
<StackPanel Orientation="Horizontal">
<TextBlock
AutomationProperties.Name="{x:Static props:Resources.Delete}"
FontFamily="{DynamicResource SymbolThemeFontFamily}"
Foreground="{DynamicResource PrimaryForegroundBrush}"
Text="&#xE74D;" />
<TextBlock
Margin="10,0,0,0"
AutomationProperties.Name="{x:Static props:Resources.Delete}"
Foreground="{DynamicResource PrimaryForegroundBrush}"
Text="{x:Static props:Resources.Delete}" />
</StackPanel>
</Button>
<StackPanel
Background="{DynamicResource PrimaryBackgroundBrush}"
Orientation="Vertical">
<Button
Style="{StaticResource DeleteButtonStyle}"
Margin="5"
AutomationProperties.Name="{x:Static props:Resources.Edit}"
Click="EditButtonClicked">
<StackPanel Orientation="Horizontal">
<TextBlock
AutomationProperties.Name="{x:Static props:Resources.Edit}"
FontFamily="{DynamicResource SymbolThemeFontFamily}"
Foreground="{DynamicResource PrimaryForegroundBrush}"
Text="&#xE70F;" />
<TextBlock
Margin="10,0,0,0"
AutomationProperties.Name="{x:Static props:Resources.Edit}"
Foreground="{DynamicResource PrimaryForegroundBrush}"
Text="{x:Static props:Resources.Edit}" />
</StackPanel>
</Button>
<Button
Style="{StaticResource DeleteButtonStyle}"
Margin="5"
AutomationProperties.Name="{x:Static props:Resources.Delete}"
Click="DeleteButtonClicked">
<StackPanel Orientation="Horizontal">
<TextBlock
AutomationProperties.Name="{x:Static props:Resources.Delete}"
FontFamily="{DynamicResource SymbolThemeFontFamily}"
Foreground="{DynamicResource PrimaryForegroundBrush}"
Text="&#xE74D;" />
<TextBlock
Margin="10,0,0,0"
AutomationProperties.Name="{x:Static props:Resources.Delete}"
Foreground="{DynamicResource PrimaryForegroundBrush}"
Text="{x:Static props:Resources.Delete}" />
</StackPanel>
</Button>
</StackPanel>
</Popup>
</StackPanel>
<Button

View File

@@ -420,6 +420,15 @@ namespace ProjectsEditor.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Search for projects or apps.
/// </summary>
public static string SearchExplanation {
get {
return ResourceManager.GetString("SearchExplanation", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to seconds ago.
/// </summary>

View File

@@ -237,6 +237,9 @@
<data name="Search" xml:space="preserve">
<value>Search</value>
</data>
<data name="SearchExplanation" xml:space="preserve">
<value>Search for projects or apps</value>
</data>
<data name="SecondsAgo" xml:space="preserve">
<value>seconds ago</value>
</data>