Skip to content

Commit

Permalink
Merge pull request #33 from Ramo-Y/bugfix/low-contrast-on-version-popup
Browse files Browse the repository at this point in the history
Bugfix/low contrast on version popup
  • Loading branch information
Ramo-Y authored Oct 13, 2024
2 parents a92a12a + 3e5366c commit 4be399e
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 37 deletions.
3 changes: 2 additions & 1 deletion .dist/whatsnew/whatsnew-de-DE
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
- Button zum Teilen der App hinzugefügt
- Komponenten aktualisiert
- Berührungszielgrösse der Felder in der Einstellungsansicht korrigiert
- Fehler behoben, bei dem sich die angezeigte Einheit nicht ändert wenn sie in den Einstellungen geändert wurde
- Fehler behoben, bei dem sich die angezeigte Einheit nicht ändert wenn sie in den Einstellungen geändert wurde
- Niedrigen Kontrast im Versions-Popup korrigiert
3 changes: 2 additions & 1 deletion .dist/whatsnew/whatsnew-en-US
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
- Added button to share the app
- Updated the components
- Fixed touch target size of the fields in the settings view
- Fixed a bug where the displayed unit does not change when changed in the settings
- Fixed a bug where the displayed unit does not change when changed in the settings
- Fixed low contrast in version popup
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<DisplayVersion>1.0.44</DisplayVersion>
<ApplicationVersion>44</ApplicationVersion>
<DisplayVersion>1.0.45</DisplayVersion>
<ApplicationVersion>45</ApplicationVersion>
<VersionPrefix>$(DisplayVersion)</VersionPrefix>
<ApplicationDisplayVersion>$(DisplayVersion)</ApplicationDisplayVersion>

Expand Down
23 changes: 11 additions & 12 deletions src/PersonalRecord.App/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ public partial class MainViewModel : ObservableObject
private string _appVersion;

[ObservableProperty]
private string _message;

private string _copyright;

[ObservableProperty]
private string _technology;

[ObservableProperty]
private string _fullVersion;

[ObservableProperty]
private bool _popupIsOpen;

Expand Down Expand Up @@ -106,17 +112,10 @@ await Share.Default.RequestAsync(new ShareTextRequest
[RelayCommand]
public void ShowDetailInformation()
{
var copyright = EnvironmentConstants.COPYRIGHT + DateTime.Now.Year.ToString();
Copyright = EnvironmentConstants.COPYRIGHT + DateTime.Now.Year.ToString();
Technology = AppResources.DevelopedWithDotNetMaui;
var informationalVersion = _versionService.GetInformationalVersion();

var stringBuilder = new StringBuilder();
stringBuilder.AppendLine(copyright);
stringBuilder.AppendLine(string.Empty);
stringBuilder.AppendLine(AppResources.DevelopedWithDotNetMaui);
stringBuilder.AppendLine(string.Empty);
stringBuilder.AppendLine($"{AppResources.FullVersion}: {informationalVersion}");

Message = stringBuilder.ToString();
FullVersion = $"{AppResources.FullVersion}: {informationalVersion}";

PopupIsOpen = true;
}
Expand Down
114 changes: 93 additions & 21 deletions src/PersonalRecord.App/Views/MainView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
<Color x:Key="TextBlack">#000000</Color>
<Color x:Key="TransparentBackground">#00FFFFFF</Color>
<Color x:Key="LogoBackgroundColor">#00E1FB</Color>

<Color x:Key="DarkHyperLink">DeepSkyBlue</Color>
<Color x:Key="LightHyperLink">MediumBlue</Color>
<Color x:Key="LabelTextLight">#26262C</Color>
<Color x:Key="LabelTextDark">#A7A3AC</Color>

<Style x:Key="SfButtonCustomStyle"
TargetType="button:SfButton">
<Setter Property="Padding" Value="15,0,0,0" />
Expand Down Expand Up @@ -48,6 +52,69 @@
</VisualStateGroupList>
</Setter>
</Style>

<Style x:Key="HyperLinkLabelCustomStyle"
TargetType="Label">
<Setter Property="TextDecorations" Value="Underline" />
<Setter Property="VerticalOptions" Value="Start" />
<Setter Property="Padding" Value="10,0,0,0" />

<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState Name="Normal">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource DarkHyperLink}, Light={StaticResource LightHyperLink}}"/>
<Setter Property="Background" Value="{StaticResource TransparentBackground}" />
</VisualState.Setters>
</VisualState>
<VisualState Name="Hovered">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource DarkHyperLink}, Light={StaticResource LightHyperLink}}"/>
<Setter Property="Background" Value="{StaticResource TransparentBackground}" />
</VisualState.Setters>
</VisualState>
<VisualState Name="Pressed">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource DarkHyperLink}, Light={StaticResource LightHyperLink}}"/>
<Setter Property="Background" Value="{StaticResource TransparentBackground}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>

<Style x:Key="DarkLightLabelCustomStyle"
TargetType="Label">
<Setter Property="VerticalTextAlignment" Value="Start" />
<Setter Property="Padding" Value="10,0,0,0" />

<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState Name="Normal">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource LabelTextDark}, Light={StaticResource LabelTextLight}}"/>
<Setter Property="Background" Value="{StaticResource TransparentBackground}" />
</VisualState.Setters>
</VisualState>
<VisualState Name="Hovered">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource LabelTextDark}, Light={StaticResource LabelTextLight}}"/>
<Setter Property="Background" Value="{StaticResource TransparentBackground}" />
</VisualState.Setters>
</VisualState>
<VisualState Name="Pressed">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource LabelTextDark}, Light={StaticResource LabelTextLight}}"/>
<Setter Property="Background" Value="{StaticResource TransparentBackground}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
</ContentPage.Resources>

<Grid>
Expand Down Expand Up @@ -109,13 +176,13 @@
Command="{Binding GoToMovementRecordAllViewCommand}"/>
</Grid>
</navigationdrawer:SfNavigationDrawer.ContentView>

<navigationdrawer:SfNavigationDrawer.DrawerSettings>
<navigationdrawer:DrawerSettings DrawerWidth="300"
DrawerHeaderHeight="220"
DrawerFooterHeight="50"
EnableSwipeGesture="True">

<navigationdrawer:DrawerSettings.DrawerHeaderView>
<Grid BackgroundColor="{StaticResource LogoBackgroundColor}">
<VerticalStackLayout VerticalOptions="Center"
Expand All @@ -129,7 +196,7 @@
</VerticalStackLayout>
</Grid>
</navigationdrawer:DrawerSettings.DrawerHeaderView>

<navigationdrawer:DrawerSettings.DrawerContentView>
<Grid>
<Grid.ColumnDefinitions>
Expand Down Expand Up @@ -183,7 +250,7 @@
Command="{Binding ShareThisAppCommand}" />
</Grid>
</navigationdrawer:DrawerSettings.DrawerContentView>

<navigationdrawer:DrawerSettings.DrawerFooterView>
<button:SfButton Background="{StaticResource LogoBackgroundColor}"
HorizontalOptions="Center"
Expand All @@ -208,30 +275,35 @@
<DataTemplate>
<Grid MaximumWidthRequest="360">
<Grid.RowDefinitions>
<RowDefinition Height="5*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="5"/>
<RowDefinition Height="*"/>
<RowDefinition Height="5"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="5"/>
<RowDefinition Height="*"/>
<RowDefinition Height="5"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Grid.Row="0"
Text="{Binding Message}"
VerticalTextAlignment="Start"
Padding="10,0,0,0"/>
<Label Grid.Row="1"
Text="{x:Static resources:AppResources.PrivacyPolicy}"
TextColor="DeepSkyBlue"
TextDecorations="Underline"
VerticalOptions="Start"
Padding="10,0,0,0">
Style="{StaticResource DarkLightLabelCustomStyle}"
Text="{Binding Copyright}"/>
<Label Grid.Row="2"
Style="{StaticResource DarkLightLabelCustomStyle}"
Text="{Binding Technology}"/>
<Label Grid.Row="4"
Style="{StaticResource DarkLightLabelCustomStyle}"
Text="{Binding FullVersion}"/>
<Label Grid.Row="6"
Style="{StaticResource HyperLinkLabelCustomStyle}"
Text="{x:Static resources:AppResources.PrivacyPolicy}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding OpenPrivacyPolicyCommand}"/>
</Label.GestureRecognizers>
</Label>
<Label Grid.Row="2"
Text="{x:Static resources:AppResources.ShowCommit}"
TextColor="DeepSkyBlue"
TextDecorations="Underline"
VerticalOptions="Start"
Padding="10,0,0,0">
<Label Grid.Row="8"
Style="{StaticResource HyperLinkLabelCustomStyle}"
Text="{x:Static resources:AppResources.ShowCommit}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding OpenCommitOnRepositoryCommand}"/>
</Label.GestureRecognizers>
Expand Down

0 comments on commit 4be399e

Please sign in to comment.