Skip to content

Commit 02ff3a8

Browse files
committed
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!
1 parent e8f8d70 commit 02ff3a8

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Microsoft.Toolkit.Uwp.Notifications/Tiles/TileCommon.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ public enum TileSize
1515
/// <summary>
1616
/// Small Square Tile
1717
/// </summary>
18-
Small = 0,
18+
Small = 1,
1919

2020
/// <summary>
2121
/// Medium Square Tile
2222
/// </summary>
23-
Medium = 1,
23+
Medium = 2,
2424

2525
/// <summary>
2626
/// Wide Rectangle Tile
2727
/// </summary>
28-
Wide = 2,
28+
Wide = 4,
2929

3030
/// <summary>
3131
/// Large Square Tile
3232
/// </summary>
33-
Large = 4
33+
Large = 8
3434
}
3535
}

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastCode.bind

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ public static TileContent GenerateTileContent()
7575
// Small Tile
7676
builder.AddTile(Notifications.TileSize.Small)
7777
.SetTextStacking(TileTextStacking.Center, Notifications.TileSize.Small)
78-
.AddText("Mon", hintStyle: AdaptiveTextStyle.Body, hintAlign: AdaptiveTextAlign.Center)
79-
.AddText("63�", hintStyle: AdaptiveTextStyle.Base, hintAlign: AdaptiveTextAlign.Center);
78+
.AddText("Mon", Notifications.TileSize.Small, hintStyle: AdaptiveTextStyle.Body, hintAlign: AdaptiveTextAlign.Center)
79+
.AddText("63�", Notifications.TileSize.Small, hintStyle: AdaptiveTextStyle.Base, hintAlign: AdaptiveTextAlign.Center);
8080

8181
// Medium Tile
8282
builder.AddTile(Notifications.TileSize.Medium)

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WeatherLiveTileAndToast/WeatherLiveTileAndToastPage.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ public static TileContent GenerateTileContent()
7575
// Small Tile
7676
builder.AddTile(Notifications.TileSize.Small)
7777
.SetTextStacking(TileTextStacking.Center, Notifications.TileSize.Small)
78-
.AddText("Mon", hintStyle: AdaptiveTextStyle.Body, hintAlign: AdaptiveTextAlign.Center)
79-
.AddText("63°", hintStyle: AdaptiveTextStyle.Base, hintAlign: AdaptiveTextAlign.Center);
78+
.AddText("Mon", Notifications.TileSize.Small, hintStyle: AdaptiveTextStyle.Body, hintAlign: AdaptiveTextAlign.Center)
79+
.AddText("63°", Notifications.TileSize.Small, hintStyle: AdaptiveTextStyle.Base, hintAlign: AdaptiveTextAlign.Center);
8080

8181
// Medium Tile
8282
builder.AddTile(Notifications.TileSize.Medium)

0 commit comments

Comments
 (0)