1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-30 15:06:06 +00:00
This commit is contained in:
Yan Maniez 2018-09-16 16:09:52 +02:00
parent 985dbfabb9
commit cd3e556837
4 changed files with 25 additions and 1 deletions

View file

@ -246,6 +246,14 @@
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertine}" />
</Style>
<Style TargetType="Label" x:Key="tablecellalt">
<Setter Property="FontSize" Value="14" />
<Setter Property="Margin" Value="1" />
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
<Setter Property="BackgroundColor" Value="{StaticResource HDLightGrey}" />
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertine}" />
</Style>
<Style TargetType="NavigationPage" ApplyToDerivedTypes="True">
<Setter Property="BarBackgroundColor" Value="{StaticResource HDWhite}" />
<Setter Property="BarTextColor" Value="{StaticResource HDRed}" />

View file

@ -20,6 +20,7 @@ namespace AideDeJeu.Tools
var fdLink = FormatedTextHelpers.FontData.FromResource("link");
var fdTableHeader = FormatedTextHelpers.FontData.FromResource("tableheader");
var fdTableCell = FormatedTextHelpers.FontData.FromResource("tablecell");
var fdTableCellAlt = FormatedTextHelpers.FontData.FromResource("tablecellalt");
this.Paragraph.FontFamily = fdParagraph.FontFamily;
this.Paragraph.FontSize = (float)fdParagraph.FontSize;
@ -68,6 +69,11 @@ namespace AideDeJeu.Tools
this.TableCell.Attributes = fdTableCell.FontAttributes;
this.TableCell.ForegroundColor = fdTableCell.TextColor;
this.TableCellAlt.FontFamily = fdTableCellAlt.FontFamily;
this.TableCellAlt.FontSize = (float)fdTableCellAlt.FontSize;
this.TableCellAlt.Attributes = fdTableCellAlt.FontAttributes;
this.TableCellAlt.ForegroundColor = fdTableCellAlt.TextColor;
//this.Link.ForegroundColor = DefaultAccentColor;
this.Code.ForegroundColor = DefaultTextColor;
this.Code.BackgroundColor = DefaultCodeBackground;

View file

@ -94,6 +94,14 @@ namespace Xam.Forms.Markdown
BackgroundColor = Color.White,
};
this.TableCellAlt = new MarkdownStyle
{
Attributes = FontAttributes.None,
FontSize = 14,
BorderSize = 1,
BackgroundColor = Color.LightGray,
};
// Platform specific properties
switch (Device.RuntimePlatform)
{
@ -135,6 +143,8 @@ namespace Xam.Forms.Markdown
public MarkdownStyle TableCell { get; set; }
public MarkdownStyle TableCellAlt { get; set; }
public float Margin { get; set; } = 10;
}

View file

@ -478,7 +478,7 @@
foreach (var blockpar in cell)
{
var par = blockpar as Markdig.Syntax.ParagraphBlock;
var style = row.IsHeader ? Theme.TableHeader : Theme.TableCell;
var style = row.IsHeader ? Theme.TableHeader : (top%2==1) ? Theme.TableCell : Theme.TableCellAlt;
var frame = new Frame
{
BackgroundColor = style.BackgroundColor,