First draft of full custom theme.

ElementTheme everywhere

Create ElementButton
This commit is contained in:
Benoit Marty 2023-01-26 15:15:51 +01:00
parent 78544357e8
commit e4cc733f4a
50 changed files with 1082 additions and 377 deletions

View file

@ -19,15 +19,14 @@ package io.element.android.x
import android.os.Bundle
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.ui.Modifier
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.core.view.WindowCompat
import com.bumble.appyx.core.integration.NodeHost
import com.bumble.appyx.core.integrationpoint.NodeComponentActivity
import io.element.android.libraries.architecture.bindings
import io.element.android.libraries.designsystem.ElementXTheme
import io.element.android.libraries.designsystem.theme.components.ElementSurface
import io.element.android.libraries.designsystem.theme.ElementTheme
import io.element.android.libraries.di.DaggerComponentOwner
import io.element.android.x.di.AppBindings
import io.element.android.x.node.RootFlowNode
@ -41,10 +40,9 @@ class MainActivity : NodeComponentActivity() {
appBindings.matrixClientsHolder().restore(savedInstanceState)
WindowCompat.setDecorFitsSystemWindows(window, false)
setContent {
ElementXTheme {
Surface(
ElementTheme {
ElementSurface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
NodeHost(integrationPoint = appyxIntegrationPoint) {
RootFlowNode(

View file

@ -20,13 +20,13 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Close
import androidx.compose.material3.Button
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.theme.components.ElementButton
@Composable
internal fun ShowkaseButton(
@ -36,7 +36,7 @@ internal fun ShowkaseButton(
modifier: Modifier = Modifier,
) {
if (isVisible) {
Button(
ElementButton(
modifier = modifier
.padding(top = 32.dp, start = 16.dp),
onClick = onClick