style(ui): Material Design icons for window chrome, modal shell and Mission Control
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
aef41f0594
commit
89312e0b22
@@ -1,3 +1,4 @@
|
||||
using System.Globalization;
|
||||
using System.Windows.Input;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
@@ -5,6 +6,7 @@ using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Media;
|
||||
using ClaudeDo.Ui.Converters;
|
||||
|
||||
namespace ClaudeDo.Ui.Views.Controls;
|
||||
|
||||
@@ -84,9 +86,8 @@ public class ModalShell : ContentControl
|
||||
{
|
||||
if (_maxIcon is null || _window is null) return;
|
||||
var maximized = _window.WindowState == WindowState.Maximized;
|
||||
var key = maximized ? "Icon.WinRestore" : "Icon.WinMax";
|
||||
if (this.TryFindResource(key, out var geometry) && geometry is Geometry g)
|
||||
_maxIcon.Data = g;
|
||||
_maxIcon.Data = (Geometry?)IconKeyConverter.Instance.Convert(
|
||||
maximized ? "mdi:WindowRestore" : "mdi:WindowMaximize", typeof(Geometry), null, CultureInfo.InvariantCulture);
|
||||
if (_maxButton is not null)
|
||||
{
|
||||
var tipKey = maximized ? "modals.diff.restore" : "modals.diff.maximize";
|
||||
|
||||
Reference in New Issue
Block a user