Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions app-ios/Native/Sources/Root/RootScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,13 @@ public struct RootScreen: View {
@State private var composeMultiplatformEnabled = false
@State private var favoriteScreenUiMode: FavoriteScreenUiModePicker.UiMode = .swiftui
private let presenter = RootPresenter()

@State private var notificationCoordinator: NotificationNavigationCoordinator?
@Dependency(\.notificationUseCase) private var notificationUseCase
@Dependency(\.timetableUseCase) private var timetableUseCase

@State private var notificationCoordinator: NotificationNavigationCoordinator?

public init() {
UITabBar.appearance().unselectedItemTintColor = UIColor(named: "tab_inactive")
}
Expand Down Expand Up @@ -396,15 +399,41 @@ public struct RootScreen: View {
}
}
.frame(width: geometry.size.width, height: geometry.size.height)
.padding(.horizontal, 12)
.modifier(TabBarBackground())
}
.frame(height: 64)
.frame(maxWidth: .infinity)
.padding(.horizontal, 12)
.background(.ultraThinMaterial, in: Capsule())
.overlay(Capsule().stroke(AssetColors.outline.swiftUIColor, lineWidth: 1))
.environment(\.colorScheme, .dark)
.padding(.horizontal, 48)
}

/// 背景用のカスタム Modifier
private struct TabBarBackground: ViewModifier {
@Environment(\.accessibilityReduceTransparency) private var reduceTransparency

func body(content: Content) -> some View {
if reduceTransparency {
// 透明度を下げる設定が有効 → 単色背景
content
.background(AssetColors.surface.swiftUIColor, in: Capsule())
.overlay(
Capsule().stroke(AssetColors.outline.swiftUIColor, lineWidth: 1)
)
} else {
if #available(iOS 26.0, *) {
content
.glassEffect(in: Capsule())
} else {
content
.background(.ultraThinMaterial, in: Capsule())
.overlay(
Capsule().stroke(AssetColors.outline.swiftUIColor, lineWidth: 1)
)
}
}
}
}
}

#Preview {
Expand Down