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
5 changes: 5 additions & 0 deletions src/SwitchifyPc.App/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes/Theme.Light.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
6 changes: 6 additions & 0 deletions src/SwitchifyPc.App/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using SwitchifyPc.Core.Startup;
using SwitchifyPc.Core.Ui;
using SwitchifyPc.Core.Updates;
using SwitchifyPc.App.Themes;
using SwitchifyPc.Windows.AppLifecycle;
using SwitchifyPc.Windows.Bluetooth;
using SwitchifyPc.Windows.CursorOverlay;
Expand Down Expand Up @@ -44,6 +45,7 @@ public partial class App : System.Windows.Application
private MouseRepeatController? mouseRepeatController;
private WindowsCursorOverlayNotifier? cursorOverlay;
private DispatcherTimer? pairingExpiryTimer;
private AppThemeManager? themeManager;
private bool isQuitting;

protected override void OnStartup(StartupEventArgs e)
Expand Down Expand Up @@ -75,6 +77,8 @@ protected override void OnStartup(StartupEventArgs e)
existingInstanceSignal.Start(
() => Dispatcher.BeginInvoke(ShowMainWindow),
() => Dispatcher.BeginInvoke(QuitApplication));
themeManager = AppThemeManager.ForCurrentApplication(new WindowsAppThemeProvider());
themeManager.Start();
updateService = CreateUpdateService();
pairingApprovalManager = CreatePairingApprovalManager();
bluetoothStatusTracker = new BluetoothStatusTracker(onStatusChanged: UpdateBluetoothState);
Expand Down Expand Up @@ -113,6 +117,8 @@ protected override void OnExit(ExitEventArgs e)
bluetoothServer = null;
cursorOverlay?.Dispose();
cursorOverlay = null;
themeManager?.Dispose();
themeManager = null;
commandExecutor = null;
bluetoothFrameProcessor = null;
bluetoothStatusTracker = null;
Expand Down
16 changes: 8 additions & 8 deletions src/SwitchifyPc.App/Chrome/SwitchifyTitleBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:shell="clr-namespace:System.Windows.Shell;assembly=PresentationFramework"
Height="44"
Background="#D32F2F"
Foreground="White"
Background="{DynamicResource ChromeBackground}"
Foreground="{DynamicResource ChromeForeground}"
shell:WindowChrome.IsHitTestVisibleInChrome="True"
MouseLeftButtonDown="TitleBar_MouseLeftButtonDown">
<UserControl.Resources>
Expand All @@ -16,7 +16,7 @@
<Setter Property="Padding" Value="0" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Foreground" Value="{DynamicResource ChromeForeground}" />
<Setter Property="FontSize" Value="15" />
<Setter Property="FontFamily" Value="Segoe UI" />
<Setter Property="Cursor" Value="Hand" />
Expand All @@ -31,10 +31,10 @@
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Root" Property="Background" Value="#B3261E" />
<Setter TargetName="Root" Property="Background" Value="{DynamicResource ChromeBackgroundHover}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Root" Property="Background" Value="#8F1D18" />
<Setter TargetName="Root" Property="Background" Value="{DynamicResource ChromeBackgroundPressed}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Root" Property="Opacity" Value="0.45" />
Expand All @@ -56,10 +56,10 @@
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Root" Property="Background" Value="#C42B1C" />
<Setter TargetName="Root" Property="Background" Value="{DynamicResource ChromeCloseHover}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Root" Property="Background" Value="#8F1D18" />
<Setter TargetName="Root" Property="Background" Value="{DynamicResource ChromeClosePressed}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Root" Property="Opacity" Value="0.45" />
Expand Down Expand Up @@ -90,7 +90,7 @@
TextTrimming="CharacterEllipsis"
FontSize="13"
FontWeight="SemiBold"
Foreground="White" />
Foreground="{DynamicResource ChromeForeground}" />
</StackPanel>

<StackPanel Grid.Column="1"
Expand Down
Loading