3e881b79b8
- Restyle Fluent controls (buttons, fields, dialogs, ListView) to match the app's navy dark/light palette and consistent corner radii/sizing - Fix ContentDialog (Settings, exit-confirm, error) styling by binding PrimaryButtonStyle/CloseButtonStyle explicitly via new DialogHelper, since ContentDialog ignores implicit Button styles and forces accent color onto whichever button is DefaultButton - Remove MicaBackdrop and theme the title bar directly so it no longer shows a gray tint mismatched with the app's navy background - Replace placeholder Assets/*.png (unused VS template art) with the real AmiReel logo at all required tile/splash/store sizes - Set explicit default window size (1280x860, matching the old WPF app) with DPI-aware centering and a minimum size, instead of sizing to content - Fix drag-and-drop silently failing: InputList_Drop needs a DragOperationDeferral before the first await or the DataView is torn down before GetStorageItemsAsync completes - Add Preview player path setting (was present in WPF, missing in WinUI) and error handling for preview playback - Accept all ffmpeg-readable video formats (mp4, mov, mkv, webm, ...) for file picker and drag-and-drop, not just .avi - Add exit-confirmation dialog to WinUI, mirroring the WPF app Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
34 lines
1.4 KiB
C#
34 lines
1.4 KiB
C#
using Microsoft.UI.Xaml;
|
|
using Microsoft.UI.Xaml.Controls;
|
|
using Microsoft.UI.Xaml.Media;
|
|
|
|
namespace AmiReel_WinUI;
|
|
|
|
/// <summary>
|
|
/// Builds ContentDialogs styled to match the app's own palette and button shapes,
|
|
/// since ContentDialog's default Fluent look (accent-pill primary button, plain
|
|
/// square close button, ungrouped theme resources) does not follow our custom brushes.
|
|
/// </summary>
|
|
internal static class DialogHelper
|
|
{
|
|
public static ContentDialog CreateStyled(XamlRoot xamlRoot, ElementTheme theme)
|
|
{
|
|
string themeKey = theme == ElementTheme.Dark ? "Dark" : "Light";
|
|
ResourceDictionary themeDictionary = (ResourceDictionary)Application.Current.Resources.ThemeDictionaries[themeKey];
|
|
|
|
return new ContentDialog
|
|
{
|
|
XamlRoot = xamlRoot,
|
|
RequestedTheme = theme,
|
|
Background = (Brush)themeDictionary["PanelBrush"],
|
|
Foreground = (Brush)themeDictionary["TextBrush"],
|
|
BorderBrush = (Brush)themeDictionary["HeroBorderBrush"],
|
|
BorderThickness = new Thickness(1.5),
|
|
CornerRadius = new CornerRadius(18),
|
|
PrimaryButtonStyle = (Style)Application.Current.Resources["DialogPrimaryButtonStyle"],
|
|
SecondaryButtonStyle = (Style)Application.Current.Resources["DialogCloseButtonStyle"],
|
|
CloseButtonStyle = (Style)Application.Current.Resources["DialogCloseButtonStyle"]
|
|
};
|
|
}
|
|
}
|