Skip to content

Commit 1977426

Browse files
authored
Merge pull request #276 from enisn/apptheme-adaptation
AppTheme adaptation for outline colors
2 parents 6be3dbf + 5d20f2a commit 1977426

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/InputKit.Maui/Shared/Controls/AdvancedEntry.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ public partial class AdvancedEntry : StackLayout, IValidatable
1616
/// </summary>
1717
public static GlobalSetting GlobalSetting { get; private set; } = new GlobalSetting
1818
{
19-
BackgroundColor = Colors.White,
19+
BackgroundColor = Application.Current.PlatformAppTheme == AppTheme.Dark ? Colors.Black : Colors.White,
2020
CornerRadius = 20,
21-
BorderColor = Colors.Gray,
21+
BorderColor = Application.Current.PlatformAppTheme == AppTheme.Dark ? Colors.WhiteSmoke : Colors.Gray,
2222
Color = InputKitOptions.GetAccentColor(),
2323
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
2424
Size = -1, /* This is not supported for this control*/

src/InputKit.Maui/Shared/Controls/CheckBox.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public partial class CheckBox : StatefulStackLayout, IValidatable
1919
{
2020
BackgroundColor = Colors.Transparent,
2121
Color = InputKitOptions.GetAccentColor(),
22-
BorderColor = Colors.Black,
22+
BorderColor = Application.Current.PlatformAppTheme == AppTheme.Dark ? Colors.WhiteSmoke : Colors.Black,
2323
TextColor = (Color)Label.TextColorProperty.DefaultValue,
2424
Size = 25,
2525
CornerRadius = 2,

src/InputKit.Maui/Shared/Controls/RadioButton.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class RadioButton : StatefulStackLayout
2020
public static GlobalSetting GlobalSetting { get; private set; } = new GlobalSetting
2121
{
2222
Color = InputKitOptions.GetAccentColor(),
23-
BorderColor = Colors.Black,
23+
BorderColor = Application.Current.PlatformAppTheme == AppTheme.Dark ? Colors.WhiteSmoke : Colors.Black,
2424
TextColor = (Color)Label.TextColorProperty.DefaultValue,
2525
Size = 25,
2626
CornerRadius = -1,

0 commit comments

Comments
 (0)