Skip to content

Change the background with image + Change Font #5

Answered by mattiarossini
lolbased21 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello!
In the MinimalClockView.swift file you can change:

  • the background color: in the draw function modify NSColor.black.setFill() specifying the chosen color;
  • the background with an image: in the draw function add NSImage(contentsOf: URL(string: "https://url_to_image")!)?.draw(in: rect);
  • the font: in the font function replace let font = NSFont.systemFont(ofSize: fontSize, weight: weight) with let font = NSFont(name: "font_name", size: fontSize)! where font_name is the name of the chosen font.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mattiarossini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants