From 9744619eb446ecf5cf9a67b3135ea0bf11198917 Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Wed, 17 Jun 2026 08:17:09 +0200 Subject: [PATCH] =?UTF-8?q?fix(ui):=20mobile=20tab=20bar=20=E2=80=94=20uni?= =?UTF-8?q?form=20sizing,=20indicator=20overlap,=20spacing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - UniformGrid Columns="5" on TabStrip so all 5 tabs always stay on one row on Android (Rows="1" alone did not auto-calculate columns at measure time on the Android Avalonia renderer) - Contacts tab header was using hardcoded FontSize=13/Width=24/Spacing=4 instead of the TabFontSize/TabIconSize/TabSpacing ViewModel bindings, making it visually larger than the other four tabs on mobile - ContentPresenter Margin="0,0,0,4" in Controls.axaml pushes the tab header content above the 2 px selection indicator, which is drawn at the absolute bottom of the template Panel and was overlapping the label - TabItem horizontal padding 4→8 px and TabSpacing 2→4 for both desktop and mobile to give more breathing room between tab items --- src/App/Styles/Controls.axaml | 5 + src/App/ViewModels/MainWindowViewModel.cs | 5 + src/App/Views/MainView.axaml | 282 +++++++++++++--------- 3 files changed, 180 insertions(+), 112 deletions(-) diff --git a/src/App/Styles/Controls.axaml b/src/App/Styles/Controls.axaml index e66f843..c2da350 100644 --- a/src/App/Styles/Controls.axaml +++ b/src/App/Styles/Controls.axaml @@ -117,6 +117,11 @@ + + diff --git a/src/App/ViewModels/MainWindowViewModel.cs b/src/App/ViewModels/MainWindowViewModel.cs index 9fbd417..7113d8d 100644 --- a/src/App/ViewModels/MainWindowViewModel.cs +++ b/src/App/ViewModels/MainWindowViewModel.cs @@ -96,6 +96,11 @@ public partial class MainWindowViewModel : ViewModelBase public bool IsMobile => !IsDesktop; + // Tab bar sizing: compact on mobile so all 5 tabs fit in one row. + public double TabIconSize => IsMobile ? 20 : 24; + public double TabFontSize => IsMobile ? 10 : 13; + public double TabSpacing => IsMobile ? 4 : 4; + public string UnitLabel => _config.Unit; public AppConfig CurrentConfig => _config; diff --git a/src/App/Views/MainView.axaml b/src/App/Views/MainView.axaml index ac9fe1b..691cccd 100644 --- a/src/App/Views/MainView.axaml +++ b/src/App/Views/MainView.axaml @@ -324,7 +324,7 @@ - + @@ -332,24 +332,27 @@ - - + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + @@ -496,62 +503,87 @@ - - - + + + + + - - - + + + + PlaceholderText="{Binding Loc[send.contact.hint]}" + MinHeight="48"> - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -561,15 +593,19 @@ Foreground="{DynamicResource TextSecondaryBrush}"/> - -