Skip to content

Commit

Permalink
fix side menu tinting almost
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
  • Loading branch information
JoeMatt committed Dec 3, 2024
1 parent 3d31547 commit 325ace9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
14 changes: 8 additions & 6 deletions PVUI/Sources/PVSwiftUI/SideMenu/SideMenuView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -320,24 +320,26 @@ SideMenuView: SwiftUI.View {
navController.navigationBar.standardAppearance = appearance
navController.navigationBar.scrollEdgeAppearance = appearance
navController.navigationBar.compactAppearance = appearance
navController.navigationBar.tintColor = themeManager.currentPalette.menuIconTint
}
#endif

navController.navigationBar.tintColor = themeManager.currentPalette.menuHeaderIconTint
})
.introspectViewController(customize: { vc in
let image = UIImage(named: "provnavicon")
let menuHeaderIconTint = themeManager.currentPalette.menuHeaderIconTint
let menuIconTint = themeManager.currentPalette.menuIconTint

if menuHeaderIconTint != .clear {
image?.applyTintEffectWithColor(menuHeaderIconTint)
if menuIconTint != .clear {
image?.applyTintEffectWithColor(menuIconTint)
}
let provenanceLogo = UIBarButtonItem(image: image)
provenanceLogo.tintColor = themeManager.currentPalette.menuHeaderIconTint
provenanceLogo.tintColor = themeManager.currentPalette.menuIconTint
vc.navigationItem.leftBarButtonItem = provenanceLogo
vc.navigationItem.leftBarButtonItem?.tintColor = menuHeaderIconTint
vc.navigationController?.navigationBar.tintColor = menuHeaderIconTint
vc.navigationItem.leftBarButtonItem?.tintColor = menuIconTint
vc.navigationController?.navigationBar.tintColor = menuIconTint
})
.foregroundStyle(themeManager.currentPalette.menuIconTint.swiftUIColor)
#endif
.background(themeManager.currentPalette.menuBackground.swiftUIColor)
.add(self.searchBar)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}

0 comments on commit 325ace9

Please sign in to comment.