Skip to content

Commit 1588971

Browse files
author
Mitsutoshi Aoe
committed
Set Dock icon for macOS
1 parent 75aa52c commit 1588971

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

GUI/App.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{-# LANGUAGE CPP #-}
2+
{-# LANGUAGE TemplateHaskell #-}
23

34
-------------------------------------------------------------------------------
45
-- | Module : GUI.App
@@ -12,6 +13,7 @@ module GUI.App (initApp) where
1213
#if defined(darwin_HOST_OS)
1314
import qualified Graphics.UI.Gtk as Gtk
1415
import qualified Graphics.UI.Gtk.OSX as OSX
16+
import GUI.DataFiles (loadLogo)
1517
#endif
1618

1719
-------------------------------------------------------------------------------
@@ -25,6 +27,8 @@ initApp = do
2527
app <- OSX.applicationNew
2628
menuBar <- Gtk.menuBarNew
2729
OSX.applicationSetMenuBar app menuBar
30+
logo <- $loadLogo
31+
OSX.applicationSetDockIconPixbuf app (Just logo)
2832
OSX.applicationReady app
2933

3034
#else

threadscope.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Executable threadscope
6464
template-haskell < 2.13,
6565
temporary >= 1.1 && < 1.3
6666
if os(osx)
67-
build-depends: gtk-mac-integration
67+
build-depends: gtk-mac-integration < 0.4
6868

6969
Extensions: RecordWildCards, NamedFieldPuns, BangPatterns, PatternGuards
7070
Other-Modules: Events.HECs,

0 commit comments

Comments
 (0)