Skip to content

Commit 147e814

Browse files
authored
Merge pull request #462 from trimble-oss/459-text-cutoff-issue-and-hide-issue-on-modal-popup
459 text cutoff issue and hide issue on modal popup
2 parents 82b1ff3 + 8b3c09b commit 147e814

5 files changed

Lines changed: 28 additions & 19 deletions

File tree

Trimble.Modus.Components/Controls/Label/ControlLabel.xaml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,25 @@
55
xmlns:local="clr-namespace:Trimble.Modus.Components;assembly=Trimble.Modus.Components"
66
x:Class="Trimble.Modus.Components.ControlLabel"
77
x:Name="controlLabelView">
8-
<Grid x:Name="view"
9-
BindingContext="{x:Reference controlLabelView}"
10-
ColumnSpacing="6"
11-
ColumnDefinitions="auto,auto"
12-
IsVisible="{Binding TitleText,Converter={StaticResource IsStringNotNullOrEmptyConverter}}">
8+
<Grid x:Name="view"
9+
BindingContext="{x:Reference controlLabelView}"
10+
ColumnSpacing="6"
11+
ColumnDefinitions="*,Auto" HorizontalOptions="Start"
12+
IsVisible="{Binding TitleText,Converter={StaticResource IsStringNotNullOrEmptyConverter}}">
1313
<Label x:Name="inputLabel"
14-
Padding="0,0,0,5"
15-
Grid.Column="0"
16-
FontFamily="OpenSansSemibold"
17-
Text="{Binding TitleText}"
18-
VerticalOptions="Center"
19-
LineBreakMode="WordWrap"
20-
HorizontalOptions="Start" />
14+
Padding="0,0,0,5"
15+
Grid.Column="0"
16+
FontFamily="OpenSansSemibold"
17+
Text="{Binding TitleText}"
18+
VerticalOptions="Center"
19+
LineBreakMode="WordWrap"
20+
HorizontalOptions="Start" />
2121
<Label Text="*"
22-
Grid.Column="1"
23-
IsVisible="{Binding IsRequired}"
24-
FontFamily="OpenSansSemibold"
25-
TextColor="{DynamicResource Danger}" />
22+
Grid.Column="1"
23+
IsVisible="{Binding IsRequired}"
24+
FontFamily="OpenSansSemibold"
25+
HorizontalOptions="Start"
26+
VerticalOptions="Center"
27+
TextColor="{DynamicResource Danger}" />
2628
</Grid>
2729
</ContentView>

Trimble.Modus.Components/Controls/TMModal/TMModalContents.xaml.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using CommunityToolkit.Maui.Behaviors;
2+
using System;
23
using Trimble.Modus.Components.Constant;
34
using Trimble.Modus.Components.Enums;
45
using Trimble.Modus.Components.Popup.Services;
@@ -227,8 +228,8 @@ internal void AddTextInput(Action<TMInput> inputConfigurationHandler = null)
227228
var inputControl = new TMInput();
228229

229230
inputConfigurationHandler?.Invoke(inputControl);
230-
231-
ModalBodyContainer.Add(inputControl);
231+
inputControl.SetDynamicResource(TMInput.HeaderTextColorProperty, "TMModalInputHeaderTextColor");
232+
ModalBodyContainer.Add(inputControl);
232233
}
233234

234235
/// <summary>

Trimble.Modus.Components/Styles/DarkThemeStyling.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,8 @@
498498
Color="{StaticResource IconDark}" />
499499
<styles:ReferenceColor x:Key="InputDefaultHelperTextColor"
500500
Color="{StaticResource DefaultTextColor}" />
501+
<styles:ReferenceColor x:Key="TMModalInputHeaderTextColor"
502+
Color="{StaticResource DefaultTextColor}"/>
501503

502504
<!--Primary-->
503505
<styles:ReferenceColor x:Key="InputPrimaryBorderColor"

Trimble.Modus.Components/Styles/LightThemeStyling.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,10 @@
493493
Color="{StaticResource IconLight}" />
494494
<styles:ReferenceColor x:Key="InputDefaultHelperTextColor"
495495
Color="{StaticResource DefaultTextColor}" />
496+
<styles:ReferenceColor x:Key="TMModalInputHeaderTextColor"
497+
Color="{StaticResource DefaultTextColor}"/>
498+
499+
496500

497501
<!--Primary-->
498502
<styles:ReferenceColor x:Key="InputPrimaryBorderColor"

Trimble.Modus.Components/Trimble.Modus.Components.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
2828
<PackageId>Trimble.Modus.Components</PackageId>
2929
<Title>Trimble Modus</Title>
30-
<Version>1.4.0.3</Version>
30+
<Version>1.4.0.4</Version>
3131
<Authors>Trimble Inc</Authors>
3232
<Company>Trimble Inc</Company>
3333
<Product>Trimble.Modus.Components</Product>

0 commit comments

Comments
 (0)