feat(ui): responsive layout for portrait mobile (Android)
Add IsMobile property and BoolToTabPlacementConverter; wire TabStripPlacement to move tabs to the bottom on mobile (standard Android pattern). Hide the desktop menu bar on mobile and expose Settings/Help via a compact header row instead. Replace fixed-width multi-column grids with dual desktop/mobile templates in History, Addresses and Contacts lists; adapt Send, Receive and the add-contact form for narrow screens. Remove hard-coded Width from all five overlays (560–640 px) in favour of MaxWidth + Margin="16" so they never overflow a 360 px screen; add ScrollViewer to Address info, Server settings and Settings overlays. Desktop layout is unchanged: all differences are gated on the IsMobile/IsDesktop bool, which is a platform constant (false on desktop).
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Data.Converters;
|
||||
|
||||
namespace PalladiumWallet.App.ViewModels;
|
||||
|
||||
/// <summary>
|
||||
/// true (mobile) → Dock.Bottom — tab strip in basso, standard Android.
|
||||
/// false (desktop) → Dock.Top — comportamento predefinito Avalonia.
|
||||
/// </summary>
|
||||
public sealed class BoolToTabPlacementConverter : IValueConverter
|
||||
{
|
||||
public static readonly BoolToTabPlacementConverter Instance = new();
|
||||
|
||||
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture) =>
|
||||
value is true ? Dock.Bottom : Dock.Top;
|
||||
|
||||
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) =>
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
Reference in New Issue
Block a user