From 156d885e6ea523da2ae772fbf6bb76d64cb43376 Mon Sep 17 00:00:00 2001 From: Ben Weeks Date: Sat, 27 May 2023 00:19:21 +0100 Subject: [PATCH] Custom iconography for the tab buttons. ChangeLog-Added: Custom iconography for the tab buttons. --- .../Contents.json | 0 .../home.fill.fill.svg | 0 damus/Views/MainTabView.swift | 12 ++++++------ 3 files changed, 6 insertions(+), 6 deletions(-) rename damus/Assets.xcassets/iconography/{home.fill.fill.imageset => home.fill.imageset}/Contents.json (100%) rename damus/Assets.xcassets/iconography/{home.fill.fill.imageset => home.fill.imageset}/home.fill.fill.svg (100%) diff --git a/damus/Assets.xcassets/iconography/home.fill.fill.imageset/Contents.json b/damus/Assets.xcassets/iconography/home.fill.imageset/Contents.json similarity index 100% rename from damus/Assets.xcassets/iconography/home.fill.fill.imageset/Contents.json rename to damus/Assets.xcassets/iconography/home.fill.imageset/Contents.json diff --git a/damus/Assets.xcassets/iconography/home.fill.fill.imageset/home.fill.fill.svg b/damus/Assets.xcassets/iconography/home.fill.imageset/home.fill.fill.svg similarity index 100% rename from damus/Assets.xcassets/iconography/home.fill.fill.imageset/home.fill.fill.svg rename to damus/Assets.xcassets/iconography/home.fill.imageset/home.fill.fill.svg diff --git a/damus/Views/MainTabView.swift b/damus/Views/MainTabView.swift index c4641583..14bb85c8 100644 --- a/damus/Views/MainTabView.swift +++ b/damus/Views/MainTabView.swift @@ -55,11 +55,11 @@ struct TabButton: View { let bits = timeline_to_notification_bits(timeline, ev: nil) new_events = NewEventsBits(rawValue: new_events.rawValue & ~bits.rawValue) }) { - Label("", systemImage: selected == timeline ? "\(img).fill" : img) + Image(selected != timeline ? img : "\(img).fill") .contentShape(Rectangle()) .frame(maxWidth: .infinity, minHeight: 30.0) } - .foregroundColor(selected != timeline ? .gray : .primary) + .foregroundColor(.primary) } } @@ -75,10 +75,10 @@ struct TabBar: View { VStack { Divider() HStack { - TabButton(timeline: .home, img: "house", selected: $selected, new_events: $new_events, settings: settings, action: action).keyboardShortcut("1") - TabButton(timeline: .dms, img: "bubble.left.and.bubble.right", selected: $selected, new_events: $new_events, settings: settings, action: action).keyboardShortcut("2") - TabButton(timeline: .search, img: "magnifyingglass.circle", selected: $selected, new_events: $new_events, settings: settings, action: action).keyboardShortcut("3") - TabButton(timeline: .notifications, img: "bell", selected: $selected, new_events: $new_events, settings: settings, action: action).keyboardShortcut("4") + TabButton(timeline: .home, img: "home", selected: $selected, new_events: $new_events, settings: settings, action: action).keyboardShortcut("1") + TabButton(timeline: .dms, img: "messages", selected: $selected, new_events: $new_events, settings: settings, action: action).keyboardShortcut("2") + TabButton(timeline: .search, img: "search", selected: $selected, new_events: $new_events, settings: settings, action: action).keyboardShortcut("3") + TabButton(timeline: .notifications, img: "notification-bell", selected: $selected, new_events: $new_events, settings: settings, action: action).keyboardShortcut("4") } } }