diff --git a/ILSpy.Tests/MainWindow/MainWindowTests.cs b/ILSpy.Tests/MainWindow/MainWindowTests.cs index 7bdc059f3..a507fa254 100644 --- a/ILSpy.Tests/MainWindow/MainWindowTests.cs +++ b/ILSpy.Tests/MainWindow/MainWindowTests.cs @@ -65,6 +65,30 @@ public class MainWindowTests pane.Bounds.Height.Should().BeGreaterThan(0); } + [AvaloniaTest] + public async Task Toolbar_Disabled_Button_Renders_Dimmed_Icon() + { + var window = AppComposition.Current.GetExport(); + window.Show(); + + // At startup the Back button is disabled (no nav history yet — the bound Command's + // CanExecute returns false). Its icon should render visibly dimmer so the user can + // tell at a glance that it's not clickable. + await Waiters.WaitForAsync(() => window.GetVisualDescendants() + .OfType - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ILSpy/Views/MainToolBar.axaml.cs b/ILSpy/Views/MainToolBar.axaml.cs index c77206af5..c3a957a2b 100644 --- a/ILSpy/Views/MainToolBar.axaml.cs +++ b/ILSpy/Views/MainToolBar.axaml.cs @@ -82,8 +82,6 @@ public partial class MainToolBar : UserControl { var command = entry.CreateExport().Value; var button = new Button { - Margin = new global::Avalonia.Thickness(2, 0), - Padding = new global::Avalonia.Thickness(6, 0), Tag = entry.Metadata.ToolTip, Command = command, };