Add popup pin toggle

This commit is contained in:
Ray Berezowski
2026-08-26 21:01:05 -04:00
parent 9f1b012d15
commit fe86573e10
4 changed files with 24 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ Download the compiled Windows release from:
- Recent items section for quickly relaunching entries
- Nested menus, drag/drop ordering, and drag/drop item creation in Settings
- Right-click launcher entries to edit them in Settings
- Right-click launcher entries to pin or unpin them from the top
- Right-click item duplication in Settings
- Right-click items in Settings to pin them to the top of their menu
- Per-item icon and display mode

View File

@@ -12,8 +12,8 @@
<Authors>Ray Berezowski</Authors>
<ApplicationIcon>Assets\AppIcon.ico</ApplicationIcon>
<Version>1.0.1</Version>
<AssemblyVersion>1.0.1.6</AssemblyVersion>
<FileVersion>1.0.1.6</FileVersion>
<AssemblyVersion>1.0.1.7</AssemblyVersion>
<FileVersion>1.0.1.7</FileVersion>
<InformationalVersion>1.0.1</InformationalVersion>
</PropertyGroup>

View File

@@ -194,6 +194,7 @@ public partial class LauncherPopup : Window
System.Windows.Controls.ContextMenu contextMenu = new();
contextMenu.Items.Add(openAllMenuItem);
contextMenu.Items.Add(new Separator());
contextMenu.Items.Add(CreatePinMenuItem(item));
contextMenu.Items.Add(CreateEditMenuItem(item));
return new TextBlock
@@ -206,10 +207,29 @@ public partial class LauncherPopup : Window
private System.Windows.Controls.ContextMenu CreateItemContextMenu(LauncherItem item)
{
System.Windows.Controls.ContextMenu contextMenu = new();
contextMenu.Items.Add(CreatePinMenuItem(item));
contextMenu.Items.Add(CreateEditMenuItem(item));
return contextMenu;
}
private System.Windows.Controls.MenuItem CreatePinMenuItem(LauncherItem item)
{
System.Windows.Controls.MenuItem pinMenuItem = new()
{
Header = item.IsFavorite ? "Unpin from Top" : "Pin to Top"
};
pinMenuItem.Click += (_, e) =>
{
item.IsFavorite = !item.IsFavorite;
ConfigService.Save(config);
BuildItems();
QueueReposition();
e.Handled = true;
};
return pinMenuItem;
}
private System.Windows.Controls.MenuItem CreateEditMenuItem(LauncherItem item)
{
System.Windows.Controls.MenuItem editMenuItem = new()

View File

@@ -20,6 +20,7 @@ Install the **.NET Desktop Runtime** for **Windows x64**.
3. The app appears in the system tray.
4. Press `Ctrl+Alt+Space` to open the launcher.
5. Right-click a launcher entry and choose **Edit in Settings** to jump to that item.
6. Right-click a launcher entry and choose **Pin to Top** or **Unpin from Top**.
Recently launched entries appear in the launcher popup under **Recent**.