Skip to content

Commit

Permalink
Add icon for UI improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
zenangst committed Mar 2, 2024
1 parent 2c04103 commit ece2d6c
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 4 deletions.
10 changes: 10 additions & 0 deletions App/Sources/UI/Releases/Release3_23_0.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ struct Release3_23_0: View {
.frame(maxWidth: .infinity, alignment: .leading)
}
}

HStack(alignment: .top, spacing: 12) {
UIImprovementIconView(size: 24)
VStack(spacing: 12) {
Text("The User Modes have been move to the bottom of the sidebar")
.frame(maxWidth: .infinity, alignment: .leading)
}
}


}
.font(Font.system(.caption2, design: .rounded))
.frame(maxWidth: .infinity, alignment: .leading)
Expand Down
3 changes: 2 additions & 1 deletion App/Sources/UI/Views/Icons/IconOverview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ struct IconOverview: PreviewProvider {
DockIconView(size: size)
MacroIconView(.record, size: size)
MoveFocusToWindowIconView(direction: .previous, scope: .activeApplication, size: size)
MissionControlIconView(size: size)
MoveFocusToWindowIconView(direction: .next, scope: .activeApplication, size: size)
GenericAppIconView(size: size)
MissionControlIconView(size: size)
UIImprovementIconView(size: size)
MenuIconView(size: size)
MinimizeAllIconView(size: size)
UserModeIconView(size: size)
Expand Down
6 changes: 3 additions & 3 deletions App/Sources/UI/Views/Icons/ImprovementIconView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ struct ImprovementIconView: View {
.overlay { iconBorder(size) }
.overlay {
LinearGradient(stops: [
.init(color: Color(.systemYellow), location: 0),
.init(color: Color.orange, location: 1)
.init(color: Color(.systemYellow), location: 0.25),
.init(color: Color.orange, location: 0.75),
.init(color: Color(.systemRed), location: 1)
], startPoint: .top, endPoint: .bottom)
.mask {
VStack(alignment: .leading, spacing: 0) {
Expand All @@ -34,7 +35,6 @@ struct ImprovementIconView: View {
}
}
.padding(size * 0.05)
.shadow(color: Color(.systemYellow), radius: 3, y: 1)
}
.iconShape(size)
.frame(width: size, height: size)
Expand Down
53 changes: 53 additions & 0 deletions App/Sources/UI/Views/Icons/UIImprovementIconView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import SwiftUI

struct UIImprovementIconView: View {
let size: CGFloat

var body: some View {
Rectangle()
.fill(
LinearGradient(stops: [
.init(color: Color(nsColor: .systemPurple), location: 0.25),
.init(color: Color(nsColor: .systemIndigo.blended(withFraction: 0.1, of: .black)!), location: 1),
], startPoint: .top, endPoint: .bottom)
)
.overlay { iconOverlay() }
.overlay { iconBorder(size) }
.overlay {
Text("💅🏻")
.font(.system(size: size))
.rotationEffect(.degrees(19))
.offset(y: size * 0.1)
}
.overlay {
LinearGradient(stops: [
.init(color: Color(nsColor: .white), location: 0),
.init(color: Color(nsColor: .systemPurple.withSystemEffect(.pressed)), location: 0.5),
], startPoint: .top, endPoint: .bottom)
.mask {
Text("UI+")
.font(.system(size: size * 0.4, weight: .heavy, design: .rounded))
.offset(y: -size * 0.25)
}
.shadow(radius: 2)
}
.iconShape(size)
.frame(width: size, height: size)
}
}

#Preview {
HStack(alignment: .top, spacing: 8) {
UIImprovementIconView(size: 192)
VStack(alignment: .leading, spacing: 8) {
UIImprovementIconView(size: 128)
HStack(alignment: .top, spacing: 8) {
UIImprovementIconView(size: 64)
UIImprovementIconView(size: 32)
UIImprovementIconView(size: 16)
}
}
}
.padding()
}

0 comments on commit ece2d6c

Please sign in to comment.