Skip to content

Commit

Permalink
Improve colors.
Browse files Browse the repository at this point in the history
  • Loading branch information
angelinn committed May 11, 2024
1 parent 2a990f4 commit b420ea5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/TramlineFive/TramlineFive.Maui/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public App(PathService dbPathService)
WeakReferenceMessenger.Default.Send(new ChangeThemeMessage(theme));
Current.RequestedThemeChanged += (s, a) =>
{
WeakReferenceMessenger.Default.Send(new ChangeThemeMessage(a.RequestedTheme == AppTheme.Light ? Names.LightTheme : Names.DarkTheme));
if (Preferences.Get(Settings.Theme, Names.SystemDefault) == Names.SystemDefault)
WeakReferenceMessenger.Default.Send(new ChangeThemeMessage(a.RequestedTheme == AppTheme.Light ? Names.LightTheme : Names.DarkTheme));
};

System.Diagnostics.Debug.WriteLine("creating task");
Expand Down
16 changes: 8 additions & 8 deletions src/TramlineFive/TramlineFive.Maui/AppShell.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
<Setter Property="Shell.TitleColor"
Value="White" />
<Setter Property="Shell.TabBarTitleColor"
Value="DodgerBlue" />
Value="{DynamicResource IconsColor}" />
<Setter Property="Shell.BackgroundColor"
Value="{DynamicResource BarBackgroundColor}" />
<Setter Property="Shell.TabBarForegroundColor"
Value="DodgerBlue" />
Value="{DynamicResource IconsColor}" />
</Style>

<Style Class="FlyoutItemLabelStyle" TargetType="Label">
Expand All @@ -37,7 +37,7 @@

<FlyoutItem Route="Main" Title="Начало" FlyoutDisplayOptions="AsSingleItem">
<FlyoutItem.Icon>
<FontImageSource FontFamily="MaterialIconsOutlinedRegular.otf" Glyph="home" Color="DodgerBlue" />
<FontImageSource FontFamily="MaterialIconsOutlinedRegular.otf" Glyph="home" Color="{DynamicResource IconsColor}" />
</FlyoutItem.Icon>
<ShellContent Style="{StaticResource TabStyle}" Route="Map" Title="Карта" ContentTemplate="{DataTemplate pages:MapPage}">
<ShellContent.Icon>
Expand All @@ -54,7 +54,7 @@
<FontImageSource FontFamily="MaterialIconsOutlinedRegular.otf" Glyph="history" />
</ShellContent.Icon>
</ShellContent>
<Tab Route="Lines" Shell.TabBarTitleColor="DodgerBlue" Shell.TabBarForegroundColor="DodgerBlue" Title="Линии" Shell.BackgroundColor="{DynamicResource BarBackgroundColor}" Shell.FlyoutBehavior="Disabled" Shell.NavBarIsVisible="True">
<Tab Route="Lines" Shell.TabBarTitleColor="{DynamicResource IconsColor}" Shell.TabBarForegroundColor="{DynamicResource IconsColor}" Title="Линии" Shell.BackgroundColor="{DynamicResource BarBackgroundColor}" Shell.FlyoutBehavior="Disabled" Shell.NavBarIsVisible="True">
<Tab.Icon>
<FontImageSource FontFamily="MaterialIconsOutlinedRegular.otf" Glyph="departure_board" />
</Tab.Icon>
Expand All @@ -71,7 +71,7 @@
</Tab>
</FlyoutItem>

<Tab Route="LineDetails" Shell.BackgroundColor="DodgerBlue" Shell.FlyoutBehavior="Disabled" Shell.NavBarIsVisible="True" Shell.TabBarIsVisible="False">
<Tab Route="LineDetails" Shell.BackgroundColor="{DynamicResource BarBackgroundColor}" Shell.FlyoutBehavior="Disabled" Shell.NavBarIsVisible="True" Shell.TabBarIsVisible="False">
<ShellContent Route="Forward" BindingContext="{Binding LineDetailsViewModel, Source={StaticResource Locator}}" Title="{Binding TargetStop, Mode=OneWay}">
<pages:LineDetails BindingContext="{Binding}" />
</ShellContent>
Expand All @@ -83,19 +83,19 @@

<ShellContent Style="{StaticResource TabStyle}" Route="Settings" Title="Настройки" Shell.FlyoutBehavior="Disabled" ContentTemplate="{DataTemplate pages:SettingsPage}">
<ShellContent.Icon>
<FontImageSource FontFamily="MaterialIconsOutlinedRegular.otf" Color="DodgerBlue" Glyph="settings" />
<FontImageSource FontFamily="MaterialIconsOutlinedRegular.otf" Color="{DynamicResource IconsColor}" Glyph="settings" />
</ShellContent.Icon>
</ShellContent>

<ShellContent Style="{StaticResource TabStyle}" Route="Directions" Title="Пътуване (Експериментално)" ContentTemplate="{DataTemplate pages:Directions}">
<ShellContent.Icon>
<FontImageSource FontFamily="MaterialIconsOutlinedRegular.otf" Glyph="route" Color="DodgerBlue" />
<FontImageSource FontFamily="MaterialIconsOutlinedRegular.otf" Glyph="route" Color="{DynamicResource IconsColor}" />
</ShellContent.Icon>
</ShellContent>

<ShellContent Route="About" Title="Информация">
<ShellContent.Icon>
<FontImageSource FontFamily="MaterialIconsOutlinedRegular.otf" Color="DodgerBlue" Glyph="info" />
<FontImageSource FontFamily="MaterialIconsOutlinedRegular.otf" Color="{DynamicResource IconsColor}" Glyph="info" />
</ShellContent.Icon>

<pages:AboutPage />
Expand Down
2 changes: 1 addition & 1 deletion src/TramlineFive/TramlineFive.Maui/Pages/LineDetails.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<ColumnDefinition Width="100" />
</Grid.ColumnDefinitions>

<Label FontFamily="MaterialIconsOutlinedRegular.otf" TextColor="DodgerBlue" Text="share_location" FontSize="32" VerticalOptions="Center" HorizontalOptions="Center" />
<Label FontFamily="MaterialIconsOutlinedRegular.otf" TextColor="{DynamicResource IconsColor}" Text="share_location" FontSize="32" VerticalOptions="Center" HorizontalOptions="Center" />

<VerticalStackLayout Grid.Column="1" VerticalOptions="Center">
<Label Text="{Binding Code, Converter={StaticResource CodeToText}}" FontSize="14" VerticalOptions="Center" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
<Label Text="{Binding StopInfo.Code, StringFormat=' ({0})'}" TextColor="{DynamicResource IconsColor}" FontSize="Small" />
</StackLayout>

<Grid BackgroundColor="{DynamicResource BackgroundColor}">
<Label Background="{DynamicResource BackgroundColor}" FontFamily="MaterialIconsOutlinedRegular.otf" Text="&#xe570;" FontSize="40" TextColor="{DynamicResource IconsColor}" HorizontalOptions="Center" VerticalOptions="Center" />
<Grid BackgroundColor="{DynamicResource VirtualTablesTopBarColor}">
<Label Background="{DynamicResource VirtualTablesTopBarColor}" FontFamily="MaterialIconsOutlinedRegular.otf" Text="&#xe570;" FontSize="40" TextColor="{DynamicResource IconsColor}" HorizontalOptions="Center" VerticalOptions="Center" />
</Grid>

<Grid Grid.Column="1" HorizontalOptions="End" VerticalOptions="Center" Background="{DynamicResource BackgroundColor}">
<Grid Grid.Column="1" HorizontalOptions="End" VerticalOptions="Center" Background="{DynamicResource VirtualTablesTopBarColor}">
<Grid.Behaviors>
<mct:TouchBehavior DefaultAnimationDuration="350"
PressedOpacity="0.6"
Expand Down

0 comments on commit b420ea5

Please sign in to comment.