mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-04-18 05:22:11 +00:00
Better sizing
This commit is contained in:
parent
e0af56e505
commit
130eb3b2c4
@ -1,7 +1,7 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct EmptyStoreView: View {
|
struct EmptyStoreView: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
VStack {
|
||||||
Text("No Secrets").bold()
|
Text("No Secrets").bold()
|
||||||
@ -9,37 +9,38 @@ struct EmptyStoreView: View {
|
|||||||
Text("Secretive only supports Elliptic Curve keys.")
|
Text("Secretive only supports Elliptic Curve keys.")
|
||||||
}.frame(maxWidth: .infinity, maxHeight: .infinity)
|
}.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct EmptyStoreModifiableView: View {
|
struct EmptyStoreModifiableView: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
GeometryReader { windowGeometry in
|
||||||
GeometryReader { g in
|
VStack {
|
||||||
Path { path in
|
GeometryReader { g in
|
||||||
path.move(to: CGPoint(x: g.size.width / 2, y: g.size.height))
|
Path { path in
|
||||||
path.addCurve(to:
|
path.move(to: CGPoint(x: g.size.width / 2, y: g.size.height))
|
||||||
CGPoint(x: g.size.width * (3/4), y: g.size.height * (1/2)), control1:
|
path.addCurve(to:
|
||||||
CGPoint(x: g.size.width / 2, y: g.size.height * (1/2)), control2:
|
CGPoint(x: g.size.width * (3/4), y: g.size.height * (1/2)), control1:
|
||||||
CGPoint(x: g.size.width * (3/4), y: g.size.height * (1/2)))
|
CGPoint(x: g.size.width / 2, y: g.size.height * (1/2)), control2:
|
||||||
path.addCurve(to:
|
CGPoint(x: g.size.width * (3/4), y: g.size.height * (1/2)))
|
||||||
CGPoint(x: g.size.width, y: 0), control1:
|
path.addCurve(to:
|
||||||
CGPoint(x: g.size.width, y: g.size.height * (1/2)), control2:
|
CGPoint(x: g.size.width, y: 0), control1:
|
||||||
CGPoint(x: g.size.width, y: 0))
|
CGPoint(x: g.size.width, y: g.size.height * (1/2)), control2:
|
||||||
}.stroke(style: StrokeStyle(lineWidth: 5, lineCap: .round))
|
CGPoint(x: g.size.width, y: 0))
|
||||||
Path { path in
|
}.stroke(style: StrokeStyle(lineWidth: 5, lineCap: .round))
|
||||||
path.move(to: CGPoint(x: g.size.width - 10, y: 0))
|
Path { path in
|
||||||
path.addLine(to: CGPoint(x: g.size.width, y: -10))
|
path.move(to: CGPoint(x: g.size.width - 10, y: 0))
|
||||||
path.addLine(to: CGPoint(x: g.size.width + 10, y: 0))
|
path.addLine(to: CGPoint(x: g.size.width, y: -10))
|
||||||
}.fill()
|
path.addLine(to: CGPoint(x: g.size.width + 10, y: 0))
|
||||||
}.frame(height: 100).padding()
|
}.fill()
|
||||||
Text("No Secrets").bold()
|
}.frame(height: (windowGeometry.size.height/2) - 20).padding()
|
||||||
Text("Create a new one by clicking here.")
|
Text("No Secrets").bold()
|
||||||
Spacer()
|
Text("Create a new one by clicking here.")
|
||||||
}.frame(maxWidth: .infinity, maxHeight: .infinity)
|
Spacer()
|
||||||
|
}.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct EmptyStoreModifiableView_Previews: PreviewProvider {
|
struct EmptyStoreModifiableView_Previews: PreviewProvider {
|
||||||
|
Loading…
Reference in New Issue
Block a user