@@ -548,7 +548,7 @@ class MainViewController: UIViewController {
548548 @objc func onAddressBarPositionChanged( ) {
549549 viewCoordinator. moveAddressBarToPosition ( appSettings. currentAddressBarPosition)
550550 refreshViewsBasedOnAddressBarPosition ( appSettings. currentAddressBarPosition)
551- updateAddressBarPositionRelatedColors ( )
551+ updateStatusBarBackgroundColor ( )
552552 }
553553
554554 @objc private func onShowFullURLAddressChanged( ) {
@@ -2411,13 +2411,19 @@ extension MainViewController: AutoClearWorker {
24112411
24122412extension MainViewController {
24132413
2414- private func updateAddressBarPositionRelatedColors( ) {
2414+ override func traitCollectionDidChange( _ previousTraitCollection: UITraitCollection ? ) {
2415+ super. traitCollectionDidChange ( previousTraitCollection)
2416+
2417+ updateStatusBarBackgroundColor ( )
2418+ }
2419+
2420+ private func updateStatusBarBackgroundColor( ) {
24152421 let theme = ThemeManager . shared. currentTheme
24162422
24172423 if appSettings. currentAddressBarPosition == . bottom {
24182424 viewCoordinator. statusBackground. backgroundColor = theme. backgroundColor
24192425 } else {
2420- if AppWidthObserver . shared. isLargeWidth {
2426+ if AppWidthObserver . shared. isPad && traitCollection . horizontalSizeClass == . regular {
24212427 viewCoordinator. statusBackground. backgroundColor = theme. tabsBarBackgroundColor
24222428 } else {
24232429 viewCoordinator. statusBackground. backgroundColor = theme. omniBarBackgroundColor
@@ -2428,22 +2434,20 @@ extension MainViewController {
24282434 private func decorate( ) {
24292435 let theme = ThemeManager . shared. currentTheme
24302436
2431- setNeedsStatusBarAppearanceUpdate ( )
2437+ updateStatusBarBackgroundColor ( )
24322438
2433- updateAddressBarPositionRelatedColors ( )
2439+ setNeedsStatusBarAppearanceUpdate ( )
24342440
24352441 view. backgroundColor = theme. mainViewBackgroundColor
24362442
24372443 viewCoordinator. navigationBarContainer. backgroundColor = theme. barBackgroundColor
24382444 viewCoordinator. navigationBarContainer. tintColor = theme. barTintColor
2439-
2440-
2445+
24412446 viewCoordinator. toolbar. barTintColor = theme. barBackgroundColor
24422447 viewCoordinator. toolbar. tintColor = theme. barTintColor
24432448
24442449 viewCoordinator. toolbarTabSwitcherButton. tintColor = theme. barTintColor
24452450
2446-
24472451 viewCoordinator. logoText. tintColor = theme. ddgTextTintColor
24482452 }
24492453
0 commit comments