Skip to content

Commit

Permalink
Merge pull request #65 from crystall1nedev/osx
Browse files Browse the repository at this point in the history
  • Loading branch information
Beyley authored May 12, 2024
2 parents 0c5051f + 7ca26ee commit dd1b6c5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Refresher/UI/RefresherForm.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Eto.Drawing;
using Eto.Forms;
using Sentry;
using System.Runtime.InteropServices;

namespace Refresher.UI;

Expand All @@ -22,6 +23,9 @@ protected RefresherForm(string subtitle, Size size, bool padBottom = true)
this.Padding = new Padding(10, 10, 10, padBottom ? 10 : 0);

this.Icon = Icon.FromResource("refresher.ico");

if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Menu = new RefresherMenuBar();
}

/// <summary>
Expand All @@ -38,4 +42,12 @@ protected RefresherForm(string subtitle, Size size, bool padBottom = true)

if (close) this.Visible = false;
}

public class RefresherMenuBar : MenuBar
{
public RefresherMenuBar() {
Style = "MenuBar";
IncludeSystemItems = MenuBarSystemItems.All;
}
}
}

0 comments on commit dd1b6c5

Please sign in to comment.