11using InputKit . Shared . Abstraction ;
22using InputKit . Shared . Configuration ;
3- using Plainer . Maui . Controls ;
43using System . Text . RegularExpressions ;
54using System . Windows . Input ;
65
@@ -43,7 +42,7 @@ public partial class AdvancedEntry : StackLayout, IValidatable
4342 readonly Label lblAnnotation = new Label { Margin = new Thickness ( 6 , 0 , 0 , 0 ) , IsVisible = false , FontSize = Device . GetNamedSize ( NamedSize . Micro , typeof ( Label ) ) , Opacity = 0.8 , TextColor = GlobalSetting . TextColor , FontFamily = GlobalSetting . FontFamily } ;
4443 readonly Frame frmBackground = new Frame { BackgroundColor = GlobalSetting . BackgroundColor , CornerRadius = ( float ) GlobalSetting . CornerRadius , BorderColor = GlobalSetting . BorderColor , Padding = new Thickness ( 5 , 0 , 0 , 0 ) , HasShadow = false } ;
4544 readonly Image imgWarning = new Image { Margin = 10 , HorizontalOptions = LayoutOptions . End , VerticalOptions = LayoutOptions . Center , InputTransparent = true , Source = "alert.png" } ;
46- readonly IconView imgIcon = new IconView { InputTransparent = true , IsVisible = false , Margin = new Thickness ( 5 , 10 , 10 , 10 ) , VerticalOptions = LayoutOptions . CenterAndExpand , HeightRequest = 30 , FillColor = GlobalSetting . Color } ;
45+ readonly IconView imgIcon = new IconView { InputTransparent = true , Margin = 5 , IsVisible = false , VerticalOptions = LayoutOptions . CenterAndExpand , HeightRequest = 30 , FillColor = GlobalSetting . Color } ;
4746 readonly Entry txtInput ;
4847 #endregion
4948
@@ -57,23 +56,20 @@ public AdvancedEntry()
5756 Children . Add ( lblTitle ) ;
5857 Children . Add ( frmBackground ) ;
5958
59+ var inputGrid = new Grid ( ) ;
60+ inputGrid . ColumnDefinitions . Add ( new ColumnDefinition ( ) { Width = 30 } ) ;
61+ inputGrid . ColumnDefinitions . Add ( new ColumnDefinition ( GridLength . Star ) ) ;
62+ inputGrid . Add ( imgIcon , column : 0 ) ;
63+ inputGrid . Add ( txtInput , column : 1 ) ;
64+
6065 ApplyValidationPosition ( GlobalSetting . LabelPosition ) ;
6166
6267 frmBackground . Content = new Grid
6368 {
6469 BackgroundColor = Colors . Transparent ,
6570 Children =
6671 {
67- new StackLayout
68- {
69- Orientation = StackOrientation . Horizontal ,
70- BackgroundColor = Colors . Transparent ,
71- Children =
72- {
73- imgIcon ,
74- txtInput
75- }
76- } ,
72+ inputGrid ,
7773 imgWarning
7874 }
7975 } ;
@@ -601,7 +597,7 @@ private void ApplyValidationPosition(LabelPosition position)
601597
602598 private protected virtual Entry GetInputEntry ( )
603599 {
604- return new EntryView
600+ return new Entry
605601 {
606602 TextColor = GlobalSetting . TextColor ,
607603 PlaceholderColor = Colors . LightGray ,
0 commit comments