Skip to content

Commit

Permalink
chore: update tab bar icons for selected unselected states (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedbashir authored and rnr committed Dec 13, 2024
1 parent e3512c8 commit ac3dbe5
Show file tree
Hide file tree
Showing 17 changed files with 82 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{
"images" : [
{
"filename" : "learn filled.svg",
"filename" : "discover_active.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"images" : [

{
"filename" : "discover_inactive.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "Frame-6.svg",
"filename" : "learn_active.svg",
"idiom" : "universal"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "Frame-8.svg",
"filename" : "learn_inactive.svg",
"idiom" : "universal"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "profile_active.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "profile_inactive.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions Core/Core/SwiftGen/Assets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ public enum CoreAssets {
public static let noAnnouncements = ImageAsset(name: "noAnnouncements")
public static let noHandouts = ImageAsset(name: "noHandouts")
public static let dashboard = ImageAsset(name: "dashboard")
public static let discovery = ImageAsset(name: "discovery")
public static let learn = ImageAsset(name: "learn")
public static let profile = ImageAsset(name: "profile")
public static let discoverActive = ImageAsset(name: "discover_active")
public static let discoverInactive = ImageAsset(name: "discover_inactive")
public static let learnActive = ImageAsset(name: "learn_active")
public static let learnInactive = ImageAsset(name: "learn_inactive")
public static let profileActive = ImageAsset(name: "profile_active")
public static let profileInactive = ImageAsset(name: "profile_inactive")
public static let programs = ImageAsset(name: "programs")
public static let addPhoto = ImageAsset(name: "addPhoto")
public static let bgDelete = ImageAsset(name: "bg_delete")
Expand Down
18 changes: 15 additions & 3 deletions OpenEdX/View/MainScreenView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ struct MainScreenView: View {
registerBanner
}
.tabItem {
CoreAssets.learn.swiftUIImage.renderingMode(.template)
if viewModel.selection == .dashboard {
CoreAssets.learnActive.swiftUIImage.renderingMode(.template)
} else {
CoreAssets.learnInactive.swiftUIImage.renderingMode(.template)
}
Text(CoreLocalization.Mainscreen.learn)
}
.tag(MainTab.dashboard)
Expand Down Expand Up @@ -126,7 +130,11 @@ struct MainScreenView: View {
}
}
.tabItem {
CoreAssets.discovery.swiftUIImage.renderingMode(.template)
if viewModel.selection == .discovery {
CoreAssets.discoverActive.swiftUIImage.renderingMode(.template)
} else {
CoreAssets.discoverInactive.swiftUIImage.renderingMode(.template)
}
Text(CoreLocalization.Mainscreen.discovery)
}
.tag(MainTab.discovery)
Expand All @@ -139,7 +147,11 @@ struct MainScreenView: View {
)
}
.tabItem {
CoreAssets.profile.swiftUIImage.renderingMode(.template)
if viewModel.selection == .profile {
CoreAssets.profileActive.swiftUIImage.renderingMode(.template)
} else {
CoreAssets.profileInactive.swiftUIImage.renderingMode(.template)
}
Text(CoreLocalization.Mainscreen.profile)
}
.tag(MainTab.profile)
Expand Down

0 comments on commit ac3dbe5

Please sign in to comment.