mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-12-16 15:19:56 +00:00
Styles
This commit is contained in:
parent
46c7948d81
commit
985dbfabb9
7 changed files with 87 additions and 47 deletions
|
|
@ -150,7 +150,7 @@
|
|||
<Style TargetType="Label">
|
||||
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertine}" />
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
<Style TargetType="Label" x:Key="section">
|
||||
<Setter Property="FontSize" Value="Large" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDRed}" />
|
||||
|
|
@ -168,34 +168,16 @@
|
|||
<Setter Property="TextColor" Value="{StaticResource HDRed}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineCapitals}" />
|
||||
</Style>
|
||||
|
||||
-->
|
||||
<Style TargetType="Label" x:Key="content">
|
||||
<Setter Property="FontSize" Value="Medium" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertine}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label" x:Key="contentbold">
|
||||
<Setter Property="FontSize" Value="Medium" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineBold}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label" x:Key="contentital">
|
||||
<Setter Property="FontSize" Value="Medium" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineItal}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label" x:Key="contentboldital">
|
||||
<Setter Property="FontSize" Value="Medium" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineBoldItal}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label" x:Key="paragraph">
|
||||
<Setter Property="FontSize" Value="16" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDRed}" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
|
||||
<Setter Property="FontFamily" Value="serif" />
|
||||
</Style>
|
||||
|
||||
|
|
@ -208,39 +190,62 @@
|
|||
|
||||
<Style TargetType="Label" x:Key="heading2">
|
||||
<Setter Property="FontSize" Value="22" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDRed}" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineCapitalsBold}" />
|
||||
<Setter Property="FontAttributes" Value="Bold" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label" x:Key="heading3">
|
||||
<Setter Property="FontSize" Value="20" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDRed}" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineCapitalsBold}" />
|
||||
<Setter Property="FontAttributes" Value="Bold" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label" x:Key="heading4">
|
||||
<Setter Property="FontSize" Value="18" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDRed}" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineCapitalsBold}" />
|
||||
<Setter Property="FontAttributes" Value="Bold" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label" x:Key="heading5">
|
||||
<Setter Property="FontSize" Value="16" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDRed}" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineCapitalsBold}" />
|
||||
<Setter Property="FontAttributes" Value="Bold" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label" x:Key="heading6">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDRed}" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineCapitalsBold}" />
|
||||
<Setter Property="FontAttributes" Value="Bold" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label" x:Key="link">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDRed}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertine}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label" x:Key="tableheader">
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="Margin" Value="1" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDWhite}" />
|
||||
<Setter Property="BackgroundColor" Value="{StaticResource HDGrey}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertine}" />
|
||||
<Setter Property="FontAttributes" Value="Bold" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label" x:Key="tablecell">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Margin" Value="1" />
|
||||
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
|
||||
<Setter Property="BackgroundColor" Value="{StaticResource HDWhite}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertine}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="NavigationPage" ApplyToDerivedTypes="True">
|
||||
<Setter Property="BarBackgroundColor" Value="{StaticResource HDWhite}" />
|
||||
<Setter Property="BarTextColor" Value="{StaticResource HDRed}" />
|
||||
|
|
|
|||
|
|
@ -14,8 +14,13 @@ namespace AideDeJeu.Tools
|
|||
var fdHeading1 = FormatedTextHelpers.FontData.FromResource("heading1");
|
||||
var fdHeading2 = FormatedTextHelpers.FontData.FromResource("heading2");
|
||||
var fdHeading3 = FormatedTextHelpers.FontData.FromResource("heading3");
|
||||
//this.Paragraph.FontFamily = fd.FontFamily;
|
||||
//this.Paragraph.FontFamily = "Droid Serif";
|
||||
var fdHeading4 = FormatedTextHelpers.FontData.FromResource("heading4");
|
||||
var fdHeading5 = FormatedTextHelpers.FontData.FromResource("heading5");
|
||||
var fdHeading6 = FormatedTextHelpers.FontData.FromResource("heading6");
|
||||
var fdLink = FormatedTextHelpers.FontData.FromResource("link");
|
||||
var fdTableHeader = FormatedTextHelpers.FontData.FromResource("tableheader");
|
||||
var fdTableCell = FormatedTextHelpers.FontData.FromResource("tablecell");
|
||||
|
||||
this.Paragraph.FontFamily = fdParagraph.FontFamily;
|
||||
this.Paragraph.FontSize = (float)fdParagraph.FontSize;
|
||||
this.Paragraph.Attributes = fdParagraph.FontAttributes;
|
||||
|
|
@ -23,24 +28,54 @@ namespace AideDeJeu.Tools
|
|||
|
||||
this.Paragraph.BackgroundColor = DefaultBackgroundColor;
|
||||
this.BackgroundColor = DefaultBackgroundColor;
|
||||
//this.Paragraph.ForegroundColor = DefaultTextColor;
|
||||
|
||||
this.Heading1.ForegroundColor = fdHeading1.TextColor;
|
||||
this.Heading1.BorderColor = DefaultSeparatorColor;
|
||||
this.Heading1.FontFamily = fdHeading1.FontFamily;
|
||||
|
||||
this.Heading2.ForegroundColor = fdHeading2.TextColor;
|
||||
this.Heading2.BorderColor = DefaultSeparatorColor;
|
||||
this.Heading2.FontFamily = fdHeading2.FontFamily;
|
||||
|
||||
this.Heading3.ForegroundColor = fdHeading3.TextColor;
|
||||
this.Heading3.BorderColor = DefaultSeparatorColor;
|
||||
this.Heading3.FontFamily = fdHeading3.FontFamily;
|
||||
this.Heading4.ForegroundColor = DefaultTextColor;
|
||||
this.Heading5.ForegroundColor = DefaultTextColor;
|
||||
this.Heading6.ForegroundColor = DefaultTextColor;
|
||||
this.Link.ForegroundColor = DefaultAccentColor;
|
||||
|
||||
this.Heading4.ForegroundColor = fdHeading4.TextColor;
|
||||
this.Heading4.BorderColor = DefaultSeparatorColor;
|
||||
this.Heading4.FontFamily = fdHeading4.FontFamily;
|
||||
|
||||
this.Heading5.ForegroundColor = fdHeading5.TextColor;
|
||||
this.Heading5.BorderColor = DefaultSeparatorColor;
|
||||
this.Heading5.FontFamily = fdHeading5.FontFamily;
|
||||
|
||||
this.Heading6.ForegroundColor = fdHeading6.TextColor;
|
||||
this.Heading6.BorderColor = DefaultSeparatorColor;
|
||||
this.Heading6.FontFamily = fdHeading6.FontFamily;
|
||||
|
||||
this.Link.FontFamily = fdLink.FontFamily;
|
||||
this.Link.FontSize = (float)fdLink.FontSize;
|
||||
this.Link.Attributes = fdLink.FontAttributes;
|
||||
this.Link.ForegroundColor = fdLink.TextColor;
|
||||
|
||||
this.TableHeader.FontFamily = fdTableHeader.FontFamily;
|
||||
this.TableHeader.FontSize = (float)fdTableHeader.FontSize;
|
||||
this.TableHeader.Attributes = fdTableHeader.FontAttributes;
|
||||
this.TableHeader.ForegroundColor = fdTableHeader.TextColor;
|
||||
|
||||
this.TableCell.FontFamily = fdTableCell.FontFamily;
|
||||
this.TableCell.FontSize = (float)fdTableCell.FontSize;
|
||||
this.TableCell.Attributes = fdTableCell.FontAttributes;
|
||||
this.TableCell.ForegroundColor = fdTableCell.TextColor;
|
||||
|
||||
//this.Link.ForegroundColor = DefaultAccentColor;
|
||||
this.Code.ForegroundColor = DefaultTextColor;
|
||||
this.Code.BackgroundColor = DefaultCodeBackground;
|
||||
this.Quote.ForegroundColor = DefaultQuoteTextColor;
|
||||
this.Quote.BorderColor = DefaultQuoteBorderColor;
|
||||
this.Separator.BorderColor = DefaultSeparatorColor;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static readonly Color DefaultBackgroundColor = Color.FromHex("#FFFFFF");
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@
|
|||
<ViewCell>
|
||||
<Grid Padding="10">
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3" Text="{Binding Name}" LineBreakMode="WordWrap" Style="{DynamicResource subsubsection}" FontSize="16" />
|
||||
<Label Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Text="{Binding Link}" LineBreakMode="WordWrap" Style="{DynamicResource subsubsection}" FontSize="12" />
|
||||
<Label Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3" Text="{Binding Name}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="16" />
|
||||
<Label Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Text="{Binding Link}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="12" />
|
||||
<Image Grid.Column="0" Grid.Row="2" BackgroundColor="#FF0000" WidthRequest="20" HeightRequest="20" />
|
||||
<Image Grid.Column="1" Grid.Row="2" BackgroundColor="#00FF00" WidthRequest="20" HeightRequest="20" />
|
||||
<Image Grid.Column="2" Grid.Row="2" BackgroundColor="#0000FF" WidthRequest="20" HeightRequest="20" />
|
||||
|
|
|
|||
|
|
@ -27,15 +27,15 @@
|
|||
|
||||
<Picker Grid.Column="0" Grid.Row="0" Style="{StaticResource heading1}" HorizontalOptions="Fill" ItemsSource="{Binding BookmarkCollectionNames, Mode=OneWay}" ItemDisplayBinding="{Binding Mode=OneWay}" SelectedIndex="{Binding BookmarkCollectionIndex, Mode=TwoWay}" />
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" HorizontalOptions="Center" VerticalOptions="Center" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Margin="15,0,15,0" Style="{StaticResource subsubsection}" Text="Cette liste est vide, ajoutez des éléments à partir de la bibliothèque !" IsVisible="{Binding BookmarkCollection.Count, Converter={StaticResource IntToBooleanConverter}}" />
|
||||
<Label Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" HorizontalOptions="Center" VerticalOptions="Center" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Margin="15,0,15,0" Style="{StaticResource heading3}" Text="Cette liste est vide, ajoutez des éléments à partir de la bibliothèque !" IsVisible="{Binding BookmarkCollection.Count, Converter={StaticResource IntToBooleanConverter}}" />
|
||||
|
||||
<ListView Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" x:Name="ItemsListView" ItemsSource="{Binding BookmarkCollection}" VerticalOptions="FillAndExpand" HasUnevenRows="true" CachingStrategy="RecycleElement" SelectedItem="{Binding SelectedItem}" ItemTapped="ItemsListView_ItemTapped">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
<StackLayout Padding="10" Orientation="Vertical">
|
||||
<Label Text="{Binding Name}" LineBreakMode="WordWrap" Style="{DynamicResource subsubsection}" FontSize="16" />
|
||||
<Label Text="{Binding Link}" LineBreakMode="WordWrap" Style="{DynamicResource subsubsection}" FontSize="12" />
|
||||
<Label Text="{Binding Name}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="16" />
|
||||
<Label Text="{Binding Link}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="12" />
|
||||
</StackLayout>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<SearchBar Style="{StaticResource subsubsection}" Grid.Column="0" Grid.Row="0" x:Name="SearchBar" HeightRequest="42" SearchCommand="{Binding SearchCommand}" SearchCommandParameter="{Binding Text, Source={x:Reference SearchBar}}">
|
||||
<SearchBar Style="{StaticResource heading3}" Grid.Column="0" Grid.Row="0" x:Name="SearchBar" HeightRequest="42" SearchCommand="{Binding SearchCommand}" SearchCommandParameter="{Binding Text, Source={x:Reference SearchBar}}">
|
||||
<!--<SearchBar.Behaviors>
|
||||
<tools:TextChangedBehavior />
|
||||
</SearchBar.Behaviors>-->
|
||||
|
|
@ -29,15 +29,15 @@
|
|||
|
||||
<!--<Label Grid.Column="0" Grid.Row="1" HorizontalOptions="Center" VerticalOptions="Center" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Margin="15,0,15,0" Style="{StaticResource subsubsection}" Text="Lancez une recherche pour voir ici vos résultats !\n\n(Notez que la première recherche peut être assez longue)" IsVisible="{Binding Bookmarks.Count, Converter={StaticResource IntToBooleanConverter}}" />-->
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" HorizontalOptions="Center" VerticalOptions="Center" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Margin="15,0,15,0" Style="{StaticResource subsubsection}" Text="{x:Static properties:Resource.EmptySearchAltText}" IsVisible="{Binding Bookmarks.Count, Converter={StaticResource IntToBooleanConverter}}" />
|
||||
<Label Grid.Column="0" Grid.Row="1" HorizontalOptions="Center" VerticalOptions="Center" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Margin="15,0,15,0" Style="{StaticResource heading3}" Text="{x:Static properties:Resource.EmptySearchAltText}" IsVisible="{Binding Bookmarks.Count, Converter={StaticResource IntToBooleanConverter}}" />
|
||||
|
||||
<ListView Grid.Column="0" Grid.Row="1" x:Name="ItemsListView" ItemsSource="{Binding Items}" VerticalOptions="FillAndExpand" HasUnevenRows="true" CachingStrategy="RecycleElement" SelectedItem="{Binding SelectedItem}" ItemTapped="ItemsListView_ItemTapped">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell AutomationProperties.IsInAccessibleTree="True" AutomationId="machin" AutomationProperties.Name="hop">
|
||||
<StackLayout Padding="10" Orientation="Vertical">
|
||||
<Label Text="{Binding Preview}" LineBreakMode="WordWrap" Style="{DynamicResource subsubsection}" FontSize="16" />
|
||||
<Label Text="{Binding Item.Name}" LineBreakMode="WordWrap" Style="{DynamicResource subsubsection}" FontSize="12" />
|
||||
<Label Text="{Binding Preview}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="16" />
|
||||
<Label Text="{Binding Item.Name}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="12" />
|
||||
</StackLayout>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<ViewCell>
|
||||
<ViewCell.View>
|
||||
<StackLayout Margin="10,5,10,0" Padding="0" Spacing="0">
|
||||
<Label BindingContext="{Binding}" Text="{Binding Name}" Style="{StaticResource Key=subsubsection}" />
|
||||
<Label BindingContext="{Binding}" Text="{Binding Name}" Style="{StaticResource Key=heading3}" />
|
||||
<Picker HorizontalOptions="FillAndExpand" ItemsSource="{Binding KeyValues, Mode=OneWay}" ItemDisplayBinding="{Binding Value, Mode=OneWay}" SelectedIndex="{Binding Index, Mode=TwoWay}" />
|
||||
</StackLayout>
|
||||
</ViewCell.View>
|
||||
|
|
@ -51,8 +51,8 @@
|
|||
<DataTemplate>
|
||||
<ViewCell AutomationProperties.IsInAccessibleTree="True" AutomationId="machin" AutomationProperties.Name="hop">
|
||||
<StackLayout Padding="10" Orientation="Vertical">
|
||||
<Label Text="{Binding Name}" LineBreakMode="WordWrap" Style="{DynamicResource subsubsection}" FontSize="16" />
|
||||
<Label Text="{Binding AltNameText}" LineBreakMode="WordWrap" Style="{DynamicResource subsubsection}" FontSize="12" />
|
||||
<Label Text="{Binding Name}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="16" />
|
||||
<Label Text="{Binding AltNameText}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="12" />
|
||||
</StackLayout>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<ViewCell>
|
||||
<StackLayout Padding="10" Orientation="Vertical">
|
||||
<Label Text="{Binding Name}" LineBreakMode="WordWrap" TextColor="#0366d6" Style="{Binding NameLevel,Converter={StaticResource HeaderLevelToStyleConverter}}" />
|
||||
<Label Text="{Binding AltNameText}" LineBreakMode="WordWrap" Style="{DynamicResource subsubsection}" FontSize="12" />
|
||||
<Label Text="{Binding AltNameText}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="12" />
|
||||
</StackLayout>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue