Skip to content

Commit

Permalink
monitor icon with active wallpaper count
Browse files Browse the repository at this point in the history
  • Loading branch information
rocksdanister committed Apr 30, 2023
1 parent 2b09a95 commit 02af817
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
Binary file modified src/Lively/Lively.UI.WinUI/Assets/CustomIcons.ttf
Binary file not shown.
7 changes: 5 additions & 2 deletions src/Lively/Lively.UI.WinUI/Views/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@
x:Uid="ActiveWallpapers"
Click="ControlPanelButton_Click">
<AppBarButton.Icon>
<FontIcon x:Name="controlPanelMonitor" Glyph="&#xE7F4;">
<FontIcon
x:Name="controlPanelMonitor"
FontFamily="{StaticResource CustomIconFonts}"
Glyph="&#xE900;">
<animations:Explicit.Animations>
<animations:AnimationSet x:Name="activeWallpaperOffsetAnimation">
<animations:OffsetAnimation
Expand Down Expand Up @@ -216,7 +219,7 @@
LabelPosition="Collapsed"
ToolTipService.ToolTip="Patreon">
<AppBarButton.Icon>
<FontIcon FontFamily="{StaticResource CustomIconFonts}" Glyph="&#xE900;" />
<FontIcon FontFamily="{StaticResource CustomIconFonts}" Glyph="&#xE90b;" />
</AppBarButton.Icon>
</AppBarButton>
<AppBarSeparator />
Expand Down
11 changes: 11 additions & 0 deletions src/Lively/Lively.UI.WinUI/Views/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ private void DesktopCore_WallpaperChanged(object sender, EventArgs e)
}
}
controlPanelLabel.Label = $"{desktopCore.Wallpapers.Count} {i18n.GetString("ActiveWallpapers/Label")}";
controlPanelMonitor.Glyph = monitorGlyphs[desktopCore.Wallpapers.Count >= monitorGlyphs.Length ? monitorGlyphs.Length - 1 : desktopCore.Wallpapers.Count];
});
}

Expand Down Expand Up @@ -815,6 +816,16 @@ public static string GetEnumMemberAttrValue<T>(T enumVal) where T : Enum
new FontIcon(){ Glyph = "\uE995" },
};

private readonly string[] monitorGlyphs =
{
"\uE900",
"\uE901",
"\uE902",
"\uE903",
"\uE904",
"\uE905",
};

private static NavigationViewItem CreateMenu(string menuName, string tag, string glyph = "")
{
var item = new NavigationViewItem
Expand Down
10 changes: 5 additions & 5 deletions src/Lively/Lively.UI.WinUI/Views/Pages/AboutView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,27 @@
<CommandBar HorizontalAlignment="Left" OverflowButtonVisibility="Collapsed">
<AppBarButton Click="GithubButton_Click" ToolTipService.ToolTip="https://github.com/rocksdanister">
<AppBarButton.Icon>
<FontIcon FontFamily="{StaticResource CustomIconFonts}" Glyph="&#xE901;" />
<FontIcon FontFamily="{StaticResource CustomIconFonts}" Glyph="&#xE907;" />
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Click="TwitterButton_Click" ToolTipService.ToolTip="https://twitter.com/rocksdanister">
<AppBarButton.Icon>
<FontIcon FontFamily="{StaticResource CustomIconFonts}" Glyph="&#xE904;" />
<FontIcon FontFamily="{StaticResource CustomIconFonts}" Glyph="&#xE909;" />
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Click="RedditButton_Click" ToolTipService.ToolTip="https://reddit.com/u/rocksdanister">
<AppBarButton.Icon>
<FontIcon FontFamily="{StaticResource CustomIconFonts}" Glyph="&#xE903;" />
<FontIcon FontFamily="{StaticResource CustomIconFonts}" Glyph="&#xE908;" />
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Click="YoutubeButton_Click" ToolTipService.ToolTip="https://www.youtube.com/channel/UClep84ofxC41H8-R9UfNPSQ">
<AppBarButton.Icon>
<FontIcon FontFamily="{StaticResource CustomIconFonts}" Glyph="&#xE905;" />
<FontIcon FontFamily="{StaticResource CustomIconFonts}" Glyph="&#xE90a;" />
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Click="EmailButton_Click" ToolTipService.ToolTip="awoo.git@gmail.com">
<AppBarButton.Icon>
<FontIcon FontFamily="{StaticResource CustomIconFonts}" Glyph="&#xE902;" />
<FontIcon FontFamily="{StaticResource CustomIconFonts}" Glyph="&#xE906;" />
</AppBarButton.Icon>
</AppBarButton>
</CommandBar>
Expand Down

0 comments on commit 02af817

Please sign in to comment.