mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-19 16:31:44 +00:00
Apply theme colors to navigation drawer items
Update NavigationDrawerItem to use theme-aware colors for selected, focused, and pressed states so the side menu follows the selected theme.
This commit is contained in:
parent
c82d94c71e
commit
2ece9e544a
1 changed files with 10 additions and 0 deletions
|
|
@ -49,7 +49,9 @@ import com.nuvio.tv.data.local.ThemeDataStore
|
||||||
import com.nuvio.tv.domain.model.AppTheme
|
import com.nuvio.tv.domain.model.AppTheme
|
||||||
import com.nuvio.tv.ui.navigation.NuvioNavHost
|
import com.nuvio.tv.ui.navigation.NuvioNavHost
|
||||||
import com.nuvio.tv.ui.navigation.Screen
|
import com.nuvio.tv.ui.navigation.Screen
|
||||||
|
import com.nuvio.tv.ui.theme.NuvioColors
|
||||||
import com.nuvio.tv.ui.theme.NuvioTheme
|
import com.nuvio.tv.ui.theme.NuvioTheme
|
||||||
|
import androidx.tv.material3.NavigationDrawerItemDefaults
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
|
@ -161,6 +163,14 @@ class MainActivity : ComponentActivity() {
|
||||||
}
|
}
|
||||||
drawerState.setValue(DrawerValue.Closed)
|
drawerState.setValue(DrawerValue.Closed)
|
||||||
},
|
},
|
||||||
|
colors = NavigationDrawerItemDefaults.colors(
|
||||||
|
selectedContainerColor = NuvioColors.FocusBackground,
|
||||||
|
focusedContainerColor = NuvioColors.FocusBackground,
|
||||||
|
pressedContainerColor = NuvioColors.FocusBackground,
|
||||||
|
selectedContentColor = NuvioColors.FocusRing,
|
||||||
|
focusedContentColor = NuvioColors.FocusRing,
|
||||||
|
pressedContentColor = NuvioColors.FocusRing
|
||||||
|
),
|
||||||
leadingContent = {
|
leadingContent = {
|
||||||
Icon(imageVector = icon, contentDescription = null)
|
Icon(imageVector = icon, contentDescription = null)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue