From 404337efed6eb941d8e87fd7e3c4c2a10dfc0df4 Mon Sep 17 00:00:00 2001 From: montanon Date: Sun, 15 Mar 2026 12:57:27 -0300 Subject: [PATCH] Rewrite PKMEditor layout: stop fighting Fluent theme sizes Avalonia's Fluent theme has minimum control heights (~32px for ComboBox/NumericUpDown) that can't be forced to 24px like WinForms. Instead of setting explicit Height on every control (causing overlaps), use DockPanel flow layout that lets controls size naturally. - Remove all explicit Height="24" that Fluent theme ignores - Use DockPanel per row instead of Grid with fixed row heights - Let ComboBox/NumericUpDown use their natural Fluent heights - Increase window to 900x520 (resizable) to fit taller controls - Set FontSize="12" at UserControl level (Avalonia default) - Label width 80px with right-aligned text --- PKHeX.Avalonia/Views/MainWindow.axaml | 5 +- PKHeX.Avalonia/Views/PKMEditorView.axaml | 348 +++++++++++------------ 2 files changed, 163 insertions(+), 190 deletions(-) diff --git a/PKHeX.Avalonia/Views/MainWindow.axaml b/PKHeX.Avalonia/Views/MainWindow.axaml index 419cdba65..bb913600e 100644 --- a/PKHeX.Avalonia/Views/MainWindow.axaml +++ b/PKHeX.Avalonia/Views/MainWindow.axaml @@ -5,8 +5,9 @@ x:Class="PKHeX.Avalonia.Views.MainWindow" x:DataType="vm:MainWindowViewModel" Title="{Binding Title}" - Width="864" Height="409" - CanResize="False" + Width="900" Height="520" + MinWidth="864" MinHeight="409" + CanResize="True" DragDrop.AllowDrop="True"> diff --git a/PKHeX.Avalonia/Views/PKMEditorView.axaml b/PKHeX.Avalonia/Views/PKMEditorView.axaml index 72cc9e87f..8b9fb1e7c 100644 --- a/PKHeX.Avalonia/Views/PKMEditorView.axaml +++ b/PKHeX.Avalonia/Views/PKMEditorView.axaml @@ -3,23 +3,19 @@ xmlns:vm="using:PKHeX.Avalonia.ViewModels" xmlns:core="using:PKHeX.Core" x:Class="PKHeX.Avalonia.Views.PKMEditorView" - x:DataType="vm:PKMEditorViewModel"> + x:DataType="vm:PKMEditorViewModel" + FontSize="12"> - - - - - + + - + @@ -32,79 +28,69 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -117,12 +103,10 @@ - - - - - - + + + + @@ -134,62 +118,62 @@ - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + @@ -203,42 +187,32 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + @@ -246,12 +220,10 @@ - - - - - - + + + + @@ -262,20 +234,20 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + +