From 9207983abbf31a13b93a59a2ab0e66e25310e5b3 Mon Sep 17 00:00:00 2001 From: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> Date: Mon, 29 Aug 2022 10:19:00 +0200 Subject: [PATCH] [PowerAccent] Fix toolbar positioning on first launch (#20135) As position is being set according to toolbar width&height (depends on num of characters), on first toolbar-show size of the toolbar is wrong (list items are not set yet). Therefore, first set characters and then position. --- src/modules/poweraccent/PowerAccent.UI/Selector.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/poweraccent/PowerAccent.UI/Selector.xaml.cs b/src/modules/poweraccent/PowerAccent.UI/Selector.xaml.cs index 19d4c8e6d2..d3b58870c8 100644 --- a/src/modules/poweraccent/PowerAccent.UI/Selector.xaml.cs +++ b/src/modules/poweraccent/PowerAccent.UI/Selector.xaml.cs @@ -38,8 +38,8 @@ public partial class Selector : Window, IDisposable this.Visibility = isActive ? Visibility.Visible : Visibility.Collapsed; if (isActive) { - CenterWindow(); characters.ItemsSource = chars; + CenterWindow(); Microsoft.PowerToys.Telemetry.PowerToysTelemetry.Log.WriteEvent(new PowerAccent.Core.Telemetry.PowerAccentShowAccentMenuEvent()); } }