Skip to content

Commit

Permalink
Missing tooltip fix
Browse files Browse the repository at this point in the history
- Resolved: #2208
  • Loading branch information
rocksdanister committed Apr 30, 2024
1 parent da24d0e commit b26eee5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/Lively/Lively.UI.WinUI/Views/MainWindow.xaml
Expand Up @@ -148,6 +148,11 @@
x:Name="addWallpaperLabel"
x:Uid="AddWallpaper"
Click="AddWallpaperButton_Click">
<ToolTipService.ToolTip>
<ToolTip>
<TextBlock x:Uid="AddWallpaperDrop" />
</ToolTip>
</ToolTipService.ToolTip>
<AppBarButton.Icon>
<FontIcon Glyph="&#xE710;" />
</AppBarButton.Icon>
Expand All @@ -158,6 +163,11 @@
x:Name="controlPanelLabel"
x:Uid="ActiveWallpapers"
Click="ControlPanelButton_Click">
<ToolTipService.ToolTip>
<ToolTip>
<TextBlock x:Name="controlPanelTooltip" />
</ToolTip>
</ToolTipService.ToolTip>
<AppBarButton.Icon>
<FontIcon
x:Name="controlPanelMonitor"
Expand Down
5 changes: 4 additions & 1 deletion src/Lively/Lively.UI.WinUI/Views/MainWindow.xaml.cs
Expand Up @@ -98,6 +98,7 @@ public sealed partial class MainWindow : WindowEx
Root.DataContext = mainViewModel;
i18n = ResourceLoader.GetForViewIndependentUse();
this.controlPanelLabel.Label = $"{desktopCore.Wallpapers.Count} {i18n.GetString("ActiveWallpapers/Label")}";
this.controlPanelTooltip.Text = $"{desktopCore.Wallpapers.Count} {i18n.GetString("ActiveWallpapers/Label")}";
controlPanelMonitor.Glyph = monitorGlyphs[desktopCore.Wallpapers.Count >= monitorGlyphs.Length ? monitorGlyphs.Length - 1 : desktopCore.Wallpapers.Count];
desktopCore.WallpaperChanged += DesktopCore_WallpaperChanged;
desktopCore.WallpaperError += DesktopCore_WallpaperError;
Expand Down Expand Up @@ -206,7 +207,8 @@ private void DesktopCore_WallpaperChanged(object sender, EventArgs e)
{
_ = this.DispatcherQueue.TryEnqueue(() =>
{
//wallpaper focus steal fix.
//Wallpaper focus steal fix.
//Note: This is no longer required.
if (this.Visible)
{
if (!userSettings.Settings.ControlPanelOpened)
Expand All @@ -223,6 +225,7 @@ private void DesktopCore_WallpaperChanged(object sender, EventArgs e)
}
}
controlPanelLabel.Label = $"{desktopCore.Wallpapers.Count} {i18n.GetString("ActiveWallpapers/Label")}";
controlPanelTooltip.Text = $"{desktopCore.Wallpapers.Count} {i18n.GetString("ActiveWallpapers/Label")}";
controlPanelMonitor.Glyph = monitorGlyphs[desktopCore.Wallpapers.Count >= monitorGlyphs.Length ? monitorGlyphs.Length - 1 : desktopCore.Wallpapers.Count];
});
}
Expand Down

0 comments on commit b26eee5

Please sign in to comment.