Skip to content

Commit

Permalink
Stop using DPIScaledToolStripMenuItems
Browse files Browse the repository at this point in the history
Appears to be no longer necessary in recent KeePass versions.

Fixes #77
  • Loading branch information
luckyrat committed Aug 8, 2023
1 parent c836ba3 commit 90fabc3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions KeePassRPC/DPIScaledToolStripMenuItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ protected override void OnFontChanged(EventArgs e)

public void RefreshImage()
{
// DpiUtil.ScaleImage ?
int h = this.Height;
//int h = this.ContentRectangle.Height;
// Padding p = this.Padding;
// Padding m = this.Margin;
//Utils.ShowMonoSafeMessageBox("h: " + h);

Image bestImage = null;
for (int i = 0; i < Images.Count; i++)
{
Expand Down
10 changes: 7 additions & 3 deletions KeePassRPC/KeePassRPCExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace KeePassRPC
public sealed class KeePassRPCExt : Plugin
{
// version information
public static readonly Version PluginVersion = new Version(1, 15, 0);
public static readonly Version PluginVersion = new Version(1, 15, 1);

public override string UpdateUrl
{
Expand Down Expand Up @@ -758,15 +758,19 @@ public override ToolStripMenuItem GetMenuItem(PluginMenuType t)
// Provide a menu item for the main location(s)
if (t == PluginMenuType.Main)
{
ToolStripMenuItem tsmi = new DPIScaledToolStripMenuItem("KeePassRPC (Kee) Options...");
//TODO: Remove DPIScaledToolStripMenuItem after 2023 if no DPI regressions found
//ToolStripMenuItem tsmi = new DPIScaledToolStripMenuItem("KeePassRPC (Kee) Options...");
ToolStripMenuItem tsmi = new ToolStripMenuItem("KeePassRPC (Kee) Options...");
tsmi.Image = Properties.Resources.KPRPC64;
tsmi.Click += OnToolsOptions;
return tsmi;
}

// Provide a menu item for the group location(s)
if (t == PluginMenuType.Group)
{
ToolStripMenuItem tsmi = new DPIScaledToolStripMenuItem("Set as Kee home group");
ToolStripMenuItem tsmi = new ToolStripMenuItem("Set as Kee home group");
tsmi.Image = Properties.Resources.KPRPC64;
tsmi.Click += OnMenuSetRootGroup;
return tsmi;
}
Expand Down
2 changes: 1 addition & 1 deletion KeePassRPC/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

// Assembly version information
[assembly: AssemblyVersion("2.0.48.*")]
[assembly: AssemblyFileVersion("1.15.0.0")] // also change PluginVersion in KeePassRPCExt.cs!
[assembly: AssemblyFileVersion("1.15.1.0")] // also change PluginVersion in KeePassRPCExt.cs!

0 comments on commit 90fabc3

Please sign in to comment.