fix(app-glasses): фон очков чёрный полностью

ConnectionScreen был без фона — светлый MaterialTheme. Теперь
darkColorScheme + чёрный Box-корень вокруг обоих экранов + страховка
background(Color.Black) в ConnectionScreen. Проверено скрином:
все пиксели #000000.
This commit is contained in:
Hermes Agent
2026-08-19 23:42:31 +03:00
parent 53a0ffd3dc
commit cc3dac7a54
@@ -13,7 +13,9 @@ import android.view.KeyEvent
import android.view.MotionEvent import android.view.MotionEvent
import java.io.File import java.io.File
import androidx.activity.compose.setContent import androidx.activity.compose.setContent
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
@@ -22,10 +24,12 @@ import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.items
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.material3.darkColorScheme
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.core.view.WindowCompat import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat import androidx.core.view.WindowInsetsCompat
@@ -74,15 +78,21 @@ class MainActivity : BaseEventActivity() {
disableTrackpadSounds() disableTrackpadSounds()
WindowCompat.setDecorFitsSystemWindows(window, false) WindowCompat.setDecorFitsSystemWindows(window, false)
setContent { setContent {
MaterialTheme { MaterialTheme(colorScheme = darkColorScheme()) {
val controller = GlassesApp.instance.movieController Box(
val movieActive by controller.movieActive.collectAsState() modifier = Modifier
val title by controller.title.collectAsState() .fillMaxSize()
val player = controller.player .background(Color.Black)
if (movieActive && player != null) { ) {
GlassesMovieScreen(player = player, title = title) val controller = GlassesApp.instance.movieController
} else { val movieActive by controller.movieActive.collectAsState()
ConnectionScreen() val title by controller.title.collectAsState()
val player = controller.player
if (movieActive && player != null) {
GlassesMovieScreen(player = player, title = title)
} else {
ConnectionScreen()
}
} }
} }
} }
@@ -236,7 +246,7 @@ fun ConnectionScreen() {
val messages by connection.messages.collectAsState() val messages by connection.messages.collectAsState()
Column( Column(
modifier = Modifier.fillMaxSize().padding(24.dp), modifier = Modifier.fillMaxSize().background(Color.Black).padding(24.dp),
verticalArrangement = Arrangement.spacedBy(8.dp), verticalArrangement = Arrangement.spacedBy(8.dp),
) { ) {
Text("ViewMate Glasses", style = MaterialTheme.typography.headlineMedium) Text("ViewMate Glasses", style = MaterialTheme.typography.headlineMedium)