[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.
This commit is contained in:
Stefan Markovic
2022-08-29 10:19:00 +02:00
committed by GitHub
parent 78d65a87cd
commit 9207983abb

View File

@@ -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());
}
}