Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/UniGetUI.Avalonia/Assets/Styles/Styles.Common.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
<SolidColorBrush x:Key="TextFillColorPrimaryBrush" Color="#E4000000"/>
<SolidColorBrush x:Key="TextFillColorSecondaryBrush" Color="#9E000000"/>
<SolidColorBrush x:Key="TextFillColorTertiaryBrush" Color="#72000000"/>
<!-- Search-box placeholders. The big Discover field uses larger (thicker-stroked) text, so it
gets a lighter light-theme value to read as the same weight as the compact title-bar field. -->
<SolidColorBrush x:Key="SearchBoxPlaceholderForeground" Color="#72000000"/>
<SolidColorBrush x:Key="MegaQueryPlaceholderForeground" Color="#52000000"/>
<SolidColorBrush x:Key="TextFillColorDisabledBrush" Color="#5C000000"/>
<SolidColorBrush x:Key="TextFillColorInverseBrush" Color="#FFFFFFFF"/>
<!-- Text on accent -->
Expand Down Expand Up @@ -102,6 +106,10 @@
<SolidColorBrush x:Key="TextFillColorPrimaryBrush" Color="#FFFFFFFF"/>
<SolidColorBrush x:Key="TextFillColorSecondaryBrush" Color="#C5FFFFFF"/>
<SolidColorBrush x:Key="TextFillColorTertiaryBrush" Color="#87FFFFFF"/>
<!-- Search-box placeholders. Dark theme keeps the brighter value that matched WinUI; both fields
share it since thick-stroke heaviness only reads as darker on light backgrounds. -->
<SolidColorBrush x:Key="SearchBoxPlaceholderForeground" Color="#C5FFFFFF"/>
<SolidColorBrush x:Key="MegaQueryPlaceholderForeground" Color="#C5FFFFFF"/>
<SolidColorBrush x:Key="TextFillColorDisabledBrush" Color="#5DFFFFFF"/>
<SolidColorBrush x:Key="TextFillColorInverseBrush" Color="#E4000000"/>
<!-- Text on accent -->
Expand Down
8 changes: 5 additions & 3 deletions src/UniGetUI.Avalonia/Views/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@
VerticalAlignment="Center"
Orientation="Horizontal"
Margin="65,0,8,0"
Spacing="8"
Opacity="0.6">
Spacing="8">
<!-- Opacity follows window focus (see SetupTitleBarFocusOpacity): white title when active, dimmed when not. -->
<!-- Back button — appears once there is navigation history (mirrors WinUI's title-bar back). -->
<Button x:Name="BackButton"
Width="32" Height="32"
Expand Down Expand Up @@ -477,6 +477,7 @@
VerticalContentAlignment="Center"
Padding="12,0,4,0"
Background="Transparent"
PlaceholderForeground="{DynamicResource SearchBoxPlaceholderForeground}"
PlaceholderText="{Binding GlobalSearchPlaceholder}"
IsEnabled="{Binding GlobalSearchEnabled}"
automation:AutomationProperties.Name="{Binding GlobalSearchPlaceholder}"
Expand All @@ -492,6 +493,8 @@
<SolidColorBrush x:Key="TextControlBackground" Color="Transparent"/>
<SolidColorBrush x:Key="TextControlBackgroundPointerOver" Color="Transparent"/>
<SolidColorBrush x:Key="TextControlBackgroundFocused" Color="Transparent"/>
<!-- Fluent dims placeholders to 0.5; WinUI showed them at full secondary-text brightness. -->
<x:Double x:Key="TextControlPlaceholderOpacity">1</x:Double>
</TextBox.Resources>
</TextBox>
<Button Grid.Column="1"
Expand Down Expand Up @@ -528,7 +531,6 @@
VerticalAlignment="Center"
Margin="0,0,4,0"
Spacing="0"
Opacity="0.55"
IsVisible="False">
<!-- Minimize: horizontal line -->
<Button Width="46" Height="32" Padding="0"
Expand Down
9 changes: 9 additions & 0 deletions src/UniGetUI.Avalonia/Views/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public MainWindow()
DataContext = new MainWindowViewModel();
InitializeComponent();
SetupTitleBar();
SetupTitleBarFocusOpacity();
SetupResponsiveRail();

RestoreGeometry();
Expand Down Expand Up @@ -300,6 +301,14 @@ private void SetupResponsiveRail()
private void FlyoutDismiss_PointerPressed(object? sender, PointerPressedEventArgs e)
=> ViewModel.Sidebar.IsPaneOpen = false;

// Title-bar caption follows window focus (WinUI behaviour): full opacity — white title — when active, dimmed when not.
private void SetupTitleBarFocusOpacity()
=> this.GetObservable(IsActiveProperty).SubscribeValue(active =>
{
HamburgerPanel.Opacity = active ? 1.0 : 0.6;
WindowButtons.Opacity = active ? 1.0 : 0.55;
});

private void SetupTitleBar()
{
if (OperatingSystem.IsMacOS())
Expand Down
6 changes: 3 additions & 3 deletions src/UniGetUI.Avalonia/Views/SidebarView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<controls:SvgIcon Path="avares://UniGetUI/Assets/Symbols/update.svg" Width="24" Height="24" VerticalAlignment="Center"/>
<TextBlock Text="{t:Translate Software Updates}"
FontSize="14"
FontWeight="SemiBold"
FontWeight="Normal"
VerticalAlignment="Center"
IsVisible="{Binding $parent[local:SidebarView].ShowLabels}"/>
</StackPanel>
Expand Down Expand Up @@ -103,7 +103,7 @@
<controls:SvgIcon Path="avares://UniGetUI/Assets/Symbols/InstalledPackages.svg" Width="24" Height="24" VerticalAlignment="Center"/>
<TextBlock Text="{t:Translate Installed Packages}"
FontSize="14"
FontWeight="SemiBold"
FontWeight="Normal"
VerticalAlignment="Center"
IsVisible="{Binding $parent[local:SidebarView].ShowLabels}"/>
</StackPanel>
Expand All @@ -128,7 +128,7 @@
<controls:SvgIcon Path="avares://UniGetUI/Assets/Symbols/PackagesBundle.svg" Width="24" Height="24" VerticalAlignment="Center"/>
<TextBlock Text="{t:Translate Package Bundles}"
FontSize="14"
FontWeight="SemiBold"
FontWeight="Normal"
VerticalAlignment="Center"
IsVisible="{Binding $parent[local:SidebarView].ShowLabels}"/>
</StackPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,8 @@
BorderThickness="0"
Background="Transparent"
FontSize="28"
FontWeight="SemiBold"
FontWeight="Normal"
PlaceholderForeground="{DynamicResource MegaQueryPlaceholderForeground}"
PlaceholderText="{t:Translate Search for packages}"
automation:AutomationProperties.Name="{t:Translate Search for packages}"
Text="{Binding MegaQueryText, Mode=TwoWay}"
Expand All @@ -860,6 +861,8 @@
<SolidColorBrush x:Key="TextControlBackground" Color="Transparent"/>
<SolidColorBrush x:Key="TextControlBackgroundPointerOver" Color="Transparent"/>
<SolidColorBrush x:Key="TextControlBackgroundFocused" Color="Transparent"/>
<!-- Fluent dims placeholders to 0.5; WinUI showed them at full secondary-text brightness. -->
<x:Double x:Key="TextControlPlaceholderOpacity">1</x:Double>
</TextBox.Resources>
</TextBox>
<Button x:Name="MegaFindButton"
Expand Down
Loading