mirror of
https://github.com/par274/sharpemu.git
synced 2026-07-16 08:51:40 +00:00
* GUI: redesign library as a cover-art grid with game management Replace the sidebar game list with a full-width grid of cover tiles. Cover art is loaded automatically from each game's sce_sys/icon0.png (pic0.png fallback) and decoded off the UI thread; games without art get a deterministic gradient placeholder with the title's initials. - New layout: search/scan toolbar, tile grid with hover and selection states, bottom launch bar with cover thumbnail, collapsible launch options and console panels (console auto-opens on launch) - Right-click context menu on tiles: launch, open game folder, copy path/title ID, remove from library - Removed games persist in an ExcludedGames settings list; re-adding a folder restores any removed games beneath it - Search now also matches title IDs - Fix: placeholder brushes were constructed on the scan thread, which throws in Avalonia and was silently swallowed, yielding empty scans * GUI: show full install folder size instead of eboot.bin size The library previously displayed the size of eboot.bin alone, which wildly understates a game's real footprint. The install folder is now totaled recursively in the existing background pass (after cover art, which is cheaper and more visible), and each tile updates live once its size is ready. * GUI: selection backdrop, smaller tiles, controller navigation Address review feedback on the library redesign: - Selecting a game fades its key art (sce_sys/pic0.png, pic1.png fallback) in as the window backdrop, dimmed by a gradient scrim; decoded off the UI thread and cached per entry - Cover tiles reduced from 156px to 128px - The library can be driven with a DualSense: d-pad/left stick moves the selection (hold-to-repeat, row-aware), Cross launches, Circle stops; input is ignored while the launcher window is unfocused. Reuses the pad HID reader by compile-linking its dependency-free sources instead of referencing all of SharpEmu.Libs
199 lines
8.9 KiB
XML
199 lines
8.9 KiB
XML
<!--
|
|
Copyright (C) 2026 SharpEmu Emulator Project
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
-->
|
|
|
|
<Application xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
x:Class="SharpEmu.GUI.App"
|
|
RequestedThemeVariant="Dark">
|
|
|
|
<Application.Resources>
|
|
<Color x:Key="SystemAccentColor">#7C5CFC</Color>
|
|
|
|
<LinearGradientBrush x:Key="BgBrush" StartPoint="0%,0%" EndPoint="100%,100%">
|
|
<GradientStop Offset="0" Color="#12151F" />
|
|
<GradientStop Offset="0.55" Color="#0D1017" />
|
|
<GradientStop Offset="1" Color="#0B0D14" />
|
|
</LinearGradientBrush>
|
|
|
|
<SolidColorBrush x:Key="ChromeBrush" Color="#090C12" />
|
|
<SolidColorBrush x:Key="CardBrush" Color="#141924" />
|
|
<SolidColorBrush x:Key="CardBorderBrush" Color="#232B3A" />
|
|
<SolidColorBrush x:Key="ElevatedBrush" Color="#1B2230" />
|
|
<SolidColorBrush x:Key="TextBrush" Color="#E8ECF4" />
|
|
<SolidColorBrush x:Key="MutedBrush" Color="#8B94A7" />
|
|
<SolidColorBrush x:Key="FaintBrush" Color="#5A6478" />
|
|
<SolidColorBrush x:Key="AccentBrush" Color="#7C5CFC" />
|
|
<SolidColorBrush x:Key="AccentHoverBrush" Color="#8F73FF" />
|
|
<SolidColorBrush x:Key="DangerBrush" Color="#E5484D" />
|
|
<SolidColorBrush x:Key="DangerHoverBrush" Color="#F2555A" />
|
|
<SolidColorBrush x:Key="SuccessBrush" Color="#46C46B" />
|
|
<SolidColorBrush x:Key="TileHoverBrush" Color="#1A2130" />
|
|
<SolidColorBrush x:Key="TileSelectedBrush" Color="#212A3F" />
|
|
</Application.Resources>
|
|
|
|
<Application.Styles>
|
|
<FluentTheme />
|
|
|
|
<Style Selector="Window">
|
|
<Setter Property="FontFamily" Value="Inter, Segoe UI, sans-serif" />
|
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
|
</Style>
|
|
|
|
<Style Selector="Border.card">
|
|
<Setter Property="Background" Value="{StaticResource CardBrush}" />
|
|
<Setter Property="BorderBrush" Value="{StaticResource CardBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="CornerRadius" Value="12" />
|
|
<Setter Property="Padding" Value="16" />
|
|
</Style>
|
|
|
|
<Style Selector="Border.pill">
|
|
<Setter Property="Background" Value="{StaticResource ElevatedBrush}" />
|
|
<Setter Property="CornerRadius" Value="999" />
|
|
<Setter Property="Padding" Value="10,3" />
|
|
</Style>
|
|
|
|
<Style Selector="TextBlock.sectionTitle">
|
|
<Setter Property="FontSize" Value="11" />
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
<Setter Property="LetterSpacing" Value="1.5" />
|
|
<Setter Property="Foreground" Value="{StaticResource MutedBrush}" />
|
|
</Style>
|
|
|
|
<Style Selector="TextBlock.fieldLabel">
|
|
<Setter Property="FontSize" Value="12" />
|
|
<Setter Property="Foreground" Value="{StaticResource MutedBrush}" />
|
|
<Setter Property="Margin" Value="0,0,0,6" />
|
|
</Style>
|
|
|
|
<Style Selector="TextBox">
|
|
<Setter Property="CornerRadius" Value="8" />
|
|
</Style>
|
|
|
|
<Style Selector="Button.accent">
|
|
<Setter Property="Background" Value="{StaticResource AccentBrush}" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
<Setter Property="Padding" Value="22,10" />
|
|
<Setter Property="CornerRadius" Value="8" />
|
|
</Style>
|
|
<Style Selector="Button.accent:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
|
<Setter Property="Background" Value="{StaticResource AccentHoverBrush}" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
</Style>
|
|
|
|
<Style Selector="Button.danger">
|
|
<Setter Property="Background" Value="{StaticResource DangerBrush}" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
<Setter Property="Padding" Value="22,10" />
|
|
<Setter Property="CornerRadius" Value="8" />
|
|
</Style>
|
|
<Style Selector="Button.danger:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
|
<Setter Property="Background" Value="{StaticResource DangerHoverBrush}" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
</Style>
|
|
|
|
<Style Selector="Button.ghost">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="BorderBrush" Value="{StaticResource CardBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
|
<Setter Property="Padding" Value="12,7" />
|
|
<Setter Property="CornerRadius" Value="8" />
|
|
</Style>
|
|
<Style Selector="Button.ghost:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
|
<Setter Property="Background" Value="{StaticResource ElevatedBrush}" />
|
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
|
</Style>
|
|
|
|
<Style Selector="ToggleButton.ghost">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="BorderBrush" Value="{StaticResource CardBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
|
<Setter Property="Padding" Value="12,7" />
|
|
<Setter Property="CornerRadius" Value="8" />
|
|
</Style>
|
|
<Style Selector="ToggleButton.ghost:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
|
<Setter Property="Background" Value="{StaticResource ElevatedBrush}" />
|
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
|
</Style>
|
|
<Style Selector="ToggleButton.ghost:checked /template/ ContentPresenter#PART_ContentPresenter">
|
|
<Setter Property="Background" Value="{StaticResource ElevatedBrush}" />
|
|
<Setter Property="BorderBrush" Value="{StaticResource AccentBrush}" />
|
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
|
</Style>
|
|
|
|
<Style Selector="ContextMenu">
|
|
<Setter Property="Background" Value="{StaticResource CardBrush}" />
|
|
<Setter Property="BorderBrush" Value="{StaticResource CardBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="CornerRadius" Value="10" />
|
|
<Setter Property="Padding" Value="6" />
|
|
</Style>
|
|
<Style Selector="ContextMenu MenuItem">
|
|
<Setter Property="Padding" Value="10,7" />
|
|
<Setter Property="CornerRadius" Value="7" />
|
|
</Style>
|
|
<Style Selector="ContextMenu Separator">
|
|
<Setter Property="Background" Value="{StaticResource CardBorderBrush}" />
|
|
<Setter Property="Height" Value="1" />
|
|
<Setter Property="Margin" Value="8,4" />
|
|
</Style>
|
|
|
|
<Style Selector="ListBox.console">
|
|
<Setter Property="Background" Value="#0B0E14" />
|
|
<Setter Property="FontFamily" Value="Cascadia Mono, Consolas, Courier New, monospace" />
|
|
<Setter Property="FontSize" Value="12" />
|
|
</Style>
|
|
<Style Selector="ListBox.console ListBoxItem">
|
|
<Setter Property="Padding" Value="10,1" />
|
|
<Setter Property="MinHeight" Value="0" />
|
|
</Style>
|
|
|
|
<!-- Cover-art library grid -->
|
|
<Style Selector="ListBox.tileGrid ListBoxItem">
|
|
<Setter Property="Padding" Value="10" />
|
|
<Setter Property="Margin" Value="5" />
|
|
<Setter Property="CornerRadius" Value="14" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
<Setter Property="RenderTransform" Value="translateY(0px)" />
|
|
<Setter Property="Transitions">
|
|
<Transitions>
|
|
<TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.12" />
|
|
</Transitions>
|
|
</Setter>
|
|
</Style>
|
|
<Style Selector="ListBox.tileGrid ListBoxItem:pointerover">
|
|
<Setter Property="RenderTransform" Value="translateY(-3px)" />
|
|
</Style>
|
|
<Style Selector="ListBox.tileGrid ListBoxItem:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
|
<Setter Property="Background" Value="{StaticResource TileHoverBrush}" />
|
|
</Style>
|
|
<Style Selector="ListBox.tileGrid ListBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter">
|
|
<Setter Property="Background" Value="{StaticResource TileSelectedBrush}" />
|
|
<Setter Property="BorderBrush" Value="{StaticResource AccentBrush}" />
|
|
</Style>
|
|
<Style Selector="ListBox.tileGrid ListBoxItem:selected:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
|
<Setter Property="Background" Value="{StaticResource TileSelectedBrush}" />
|
|
<Setter Property="BorderBrush" Value="{StaticResource AccentHoverBrush}" />
|
|
</Style>
|
|
|
|
<Style Selector="Border.coverShadow">
|
|
<Setter Property="CornerRadius" Value="10" />
|
|
<Setter Property="BoxShadow" Value="0 6 14 0 #55000000" />
|
|
</Style>
|
|
<Style Selector="Border.coverClip">
|
|
<Setter Property="CornerRadius" Value="10" />
|
|
<Setter Property="ClipToBounds" Value="True" />
|
|
<Setter Property="Background" Value="{StaticResource ElevatedBrush}" />
|
|
</Style>
|
|
</Application.Styles>
|
|
|
|
</Application>
|