Fixed bug in TileBuilder small tile content

The enum flags were incorrectly specified such that when adding content to Medium/Wide/Large tiles, it also added the content to small tiles, which was resulting in the small weather tile not appearing correctly.

Note that the small weather tile preview is still missing the temperature (must be bug in NotificationsVisualizerLibrary), but when pinned to Start it looks correct!
This commit is contained in:
Andrew Leader 2020-10-30 11:21:41 -06:00
Родитель e8f8d70ff9
Коммит 02ff3a88a9
3 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -15,21 +15,21 @@ namespace Microsoft.Toolkit.Uwp.Notifications
/// <summary>
/// Small Square Tile
/// </summary>
Small = 0,
Small = 1,
/// <summary>
/// Medium Square Tile
/// </summary>
Medium = 1,
Medium = 2,
/// <summary>
/// Wide Rectangle Tile
/// </summary>
Wide = 2,
Wide = 4,
/// <summary>
/// Large Square Tile
/// </summary>
Large = 4
Large = 8
}
}

Просмотреть файл

@ -75,8 +75,8 @@ public static TileContent GenerateTileContent()
// Small Tile
builder.AddTile(Notifications.TileSize.Small)
.SetTextStacking(TileTextStacking.Center, Notifications.TileSize.Small)
.AddText("Mon", hintStyle: AdaptiveTextStyle.Body, hintAlign: AdaptiveTextAlign.Center)
.AddText("63°", hintStyle: AdaptiveTextStyle.Base, hintAlign: AdaptiveTextAlign.Center);
.AddText("Mon", Notifications.TileSize.Small, hintStyle: AdaptiveTextStyle.Body, hintAlign: AdaptiveTextAlign.Center)
.AddText("63°", Notifications.TileSize.Small, hintStyle: AdaptiveTextStyle.Base, hintAlign: AdaptiveTextAlign.Center);
// Medium Tile
builder.AddTile(Notifications.TileSize.Medium)

Просмотреть файл

@ -75,8 +75,8 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
// Small Tile
builder.AddTile(Notifications.TileSize.Small)
.SetTextStacking(TileTextStacking.Center, Notifications.TileSize.Small)
.AddText("Mon", hintStyle: AdaptiveTextStyle.Body, hintAlign: AdaptiveTextAlign.Center)
.AddText("63°", hintStyle: AdaptiveTextStyle.Base, hintAlign: AdaptiveTextAlign.Center);
.AddText("Mon", Notifications.TileSize.Small, hintStyle: AdaptiveTextStyle.Body, hintAlign: AdaptiveTextAlign.Center)
.AddText("63°", Notifications.TileSize.Small, hintStyle: AdaptiveTextStyle.Base, hintAlign: AdaptiveTextAlign.Center);
// Medium Tile
builder.AddTile(Notifications.TileSize.Medium)