Skip to content

Commit

Permalink
✨ Center menubar icon
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKai77 committed Oct 28, 2023
1 parent 3e25928 commit c39d953
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
25 changes: 25 additions & 0 deletions Loop/Assets.xcassets/menubarIcon.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "menubarIconx2.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "menubarIconx3.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions Loop/MenuBar/MenuBarIconView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ import SwiftUI
struct MenuBarIconView: View {
@State var rotationAngle: Double = 0.0
var body: some View {
Image("loop")
.resizable()
.scaledToFit()
.frame(width: 16, height: 16)
.fontWeight(.light)
// We don't use the symbol since it is *ever so slightly* off center. This is not a
// problem with only Loop's symbol symbol, but the circle.circle SF symbol also is slightly
// off center. Will need to investigate that later.
Image(.menubarIcon)
.rotationEffect(Angle.degrees(self.rotationAngle))
.onReceive(.didLoop) { _ in
self.rotationAngle = 0
Expand Down

0 comments on commit c39d953

Please sign in to comment.