Skip to content

Commit

Permalink
[#9] Set icons
Browse files Browse the repository at this point in the history
  • Loading branch information
jfacorro committed Nov 20, 2018
1 parent e75c71a commit 79b7e09
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/doodler/sketch.clje
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@
(erlang/halt 0))
close-fn))

priv-dir (-> (code/priv_dir :doodler)
(erlang/list_to_binary))
icon #(-> priv-dir
(str "/icon-" % ".ico"))
icon-bundle (reduce (fn [bundle size]
(wxIconBundle/addIcon bundle (icon size) 3)
bundle)
(wxIconBundle/new)
[16 32 128 256 512 1024])

state nil]

;; Paint events need to be handled synchronously
Expand All @@ -141,6 +151,9 @@
(wxFrame/showFullScreen frame (:present features))
(wxWindow/show frame)

;; Set icon
(wxTopLevelWindow/setIcons frame icon-bundle)

;; Signal to trigger the setup phase
(timer/send_after 0 :setup)

Expand Down

0 comments on commit 79b7e09

Please sign in to comment.