Skip to content

Commit

Permalink
Mac: Use native questionmark icon
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanfish committed Sep 22, 2024
1 parent 1d41b95 commit 31a75d5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion NAPS2.Lib.Mac/EtoForms/Mac/MacIconProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ public class MacIconProvider : IIconProvider
{ "large_tiles", "square.grid.2x2" },
{ "exclamation", "exclamationmark.triangle" },
{ "application_side_list", "sidebar.left" },
{ "ask", "questionmark" },
// TODO: Consider these
// { "ask", "questionmark" },
// { "network_ip", "wifi.router" },
// { "device", "scanner" },
};

private readonly DefaultIconProvider _defaultIconProvider;
Expand Down Expand Up @@ -77,6 +78,12 @@ public MacIconProvider(DefaultIconProvider defaultIconProvider)
{
symbol = symbol.GetImage(NSImageSymbolConfiguration.Create(32, 0.1));
}
if (name == "ask")
{
// Needs to be rendered at fixed dimensions to display properly in the Choose Device listview
symbol = symbol.GetImage(NSImageSymbolConfiguration.Create(60, 0.1));
return (Bitmap) new Bitmap(new BitmapHandler(symbol)).PadTo(new Size(64, 64));
}
return new Bitmap(new BitmapHandler(symbol));
}
}
Expand Down

0 comments on commit 31a75d5

Please sign in to comment.