@@ -5,24 +5,24 @@ struct MainToolbarModifier: ViewModifier {
55 @Binding var category : XcodeListCategory
66 @Binding var isInstalledOnly : Bool
77 @Binding var isShowingInfoPane : Bool
8-
8+
99 func body( content: Content ) -> some View {
1010 content
1111 . toolbar { toolbar }
1212 }
1313
1414 private var toolbar : some ToolbarContent {
1515 ToolbarItemGroup {
16-
1716 ProgressButton (
18- isInProgress: appState. isUpdating,
17+ isInProgress: appState. isUpdating,
1918 action: appState. update
2019 ) {
2120 Label ( " Refresh " , systemImage: " arrow.clockwise " )
2221 }
2322 . keyboardShortcut ( KeyEquivalent ( " r " ) )
2423 . help ( " RefreshDescription " )
2524 Spacer ( )
25+
2626 Button ( action: {
2727 switch category {
2828 case . all: category = . release
@@ -34,29 +34,17 @@ struct MainToolbarModifier: ViewModifier {
3434 case . all:
3535 Label ( " All " , systemImage: " line.horizontal.3.decrease.circle " )
3636 case . release:
37- if #available( macOS 11 . 3 , * ) {
38- Label ( " ReleaseOnly " , systemImage: " line.horizontal.3.decrease.circle.fill " )
39- . labelStyle ( TitleAndIconLabelStyle ( ) )
40- . foregroundColor ( . accentColor)
41- } else {
4237 Label ( " ReleaseOnly " , systemImage: " line.horizontal.3.decrease.circle.fill " )
43- . labelStyle ( TitleOnlyLabelStyle ( ) )
38+ . labelStyle ( . trailingIcon )
4439 . foregroundColor ( . accentColor)
45- }
4640 case . beta:
47- if #available( macOS 11 . 3 , * ) {
48- Label ( " BetaOnly " , systemImage: " line.horizontal.3.decrease.circle.fill " )
49- . labelStyle ( TitleAndIconLabelStyle ( ) )
50- . foregroundColor ( . accentColor)
51- } else {
52- Label ( " BetaOnly " , systemImage: " line.horizontal.3.decrease.circle.fill " )
53- . labelStyle ( TitleOnlyLabelStyle ( ) )
54- . foregroundColor ( . accentColor)
55- }
41+ Label ( " BetaOnly " , systemImage: " line.horizontal.3.decrease.circle.fill " )
42+ . labelStyle ( . trailingIcon)
43+ . foregroundColor ( . accentColor)
5644 }
5745 }
5846 . help ( " FilterAvailableDescription " )
59-
47+
6048 Button ( action: {
6149 isInstalledOnly. toggle ( )
6250 } ) {
@@ -65,11 +53,9 @@ struct MainToolbarModifier: ViewModifier {
6553 . foregroundColor ( . accentColor)
6654 } else {
6755 Label ( " Filter " , systemImage: " arrow.down.app " )
68-
6956 }
7057 }
7158 . help ( " FilterInstalledDescription " )
72-
7359 }
7460 }
7561}
@@ -80,7 +66,7 @@ extension View {
8066 isInstalledOnly: Binding < Bool > ,
8167 isShowingInfoPane: Binding < Bool >
8268 ) -> some View {
83- self . modifier (
69+ modifier (
8470 MainToolbarModifier (
8571 category: category,
8672 isInstalledOnly: isInstalledOnly,
0 commit comments