Skip to content

Commit

Permalink
fix: avoid word wrapping for single word settings values
Browse files Browse the repository at this point in the history
When a setting label is single line and its setting value is single
line, everything is displayed correctly

When a setting label is multi line and its value is single word, then
the value may not succeed to require enough space and so it may wrap in
the middle of the word and it becomes multi line

When a setting label is multi line and its value is multi words, then
the value succeed to require enough space to be displayed correctly

With `MinimumWidthRequest=100` and `LineBreakMode=WordWrap`, all three
previous cases are displayed correctly without excessive wrapping
  • Loading branch information
Ldoppea committed Jan 17, 2022
1 parent 8876276 commit a824d12
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/App/Pages/Settings/SettingsPage/SettingsPage.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<pages:BaseContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Bit.App.Pages.SettingsPage"
Expand Down Expand Up @@ -44,7 +44,9 @@
HorizontalTextAlignment="End"
VerticalOptions="CenterAndExpand"
TextColor="{Binding SubLabelColor}"
StyleClass="list-sub" />
StyleClass="list-sub"
MinimumWidthRequest="100"
LineBreakMode="WordWrap" />
<TimePicker IsVisible="{Binding ShowTimeInput}"
Time="{Binding Time}" Format="HH:mm"
PropertyChanged="OnTimePickerPropertyChanged"
Expand Down

0 comments on commit a824d12

Please sign in to comment.