Skip to content

Commit 489c309

Browse files
committed
Improve control style on iOS and visionOS
1 parent 359951c commit 489c309

3 files changed

Lines changed: 23 additions & 6 deletions

File tree

Example/PredicateViewExample.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@
309309
CODE_SIGN_STYLE = Automatic;
310310
CURRENT_PROJECT_VERSION = 1;
311311
DEVELOPMENT_ASSET_PATHS = "\"PredicateViewExample/Preview Content\"";
312+
DEVELOPMENT_TEAM = D7DS2U3H59;
312313
ENABLE_PREVIEWS = YES;
313314
GENERATE_INFOPLIST_FILE = YES;
314315
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
@@ -346,6 +347,7 @@
346347
CODE_SIGN_STYLE = Automatic;
347348
CURRENT_PROJECT_VERSION = 1;
348349
DEVELOPMENT_ASSET_PATHS = "\"PredicateViewExample/Preview Content\"";
350+
DEVELOPMENT_TEAM = D7DS2U3H59;
349351
ENABLE_PREVIEWS = YES;
350352
GENERATE_INFOPLIST_FILE = YES;
351353
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;

Sources/PredicateView/Views/NewItemMenuButton.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ struct NewItemMenuButton<Content: View>: View {
2222
Menu {
2323
menuItems()
2424
} label: {
25-
Image(systemName: "plus.circle")
25+
Image(systemName: "plus")
26+
.fontWeight(.medium)
2627
}
28+
#if os(iOS)
29+
.padding(.horizontal, 3)
30+
#endif
2731
.tint(.accentColor)
2832
.fixedSize()
2933
.menuStyle(.borderlessButton)

Sources/PredicateView/Views/TokenView.swift

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,22 @@ struct TokenView<Root, Header: View, Content: View, MenuItems: View, Widget: Vie
5353
widget
5454

5555
if isEnabled {
56-
Menu("") { menuItems }
57-
.padding(6)
58-
.fixedSize()
59-
.menuStyle(.borderlessButton)
60-
.preference(key: PredicateDeletedStatusPreferenceKey.self, value: isDeleted)
56+
Menu {
57+
menuItems
58+
} label: {
59+
#if os(visionOS)
60+
Image(systemName: "ellipsis")
61+
.fontWeight(.medium)
62+
#else
63+
EmptyView()
64+
#endif
65+
}
66+
#if os(macOS)
67+
.padding(6)
68+
#endif
69+
.fixedSize()
70+
.menuStyle(.borderlessButton)
71+
.preference(key: PredicateDeletedStatusPreferenceKey.self, value: isDeleted)
6172
}
6273
}
6374
.frame(maxHeight: .infinity, alignment: .top)

0 commit comments

Comments
 (0)