feat: still figuring out UI stuff
This commit is contained in:
parent
1da833a2a4
commit
d89a9bfaf5
4 changed files with 34 additions and 24 deletions
|
@ -9,8 +9,8 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import xyz.atnrch.wrench.colors.WrenchColors
|
||||
import xyz.atnrch.wrench.logger.Logger
|
||||
import xyz.atnrch.wrench.ui.UIColors
|
||||
import xyz.atnrch.wrench.watcher.WatcherManager
|
||||
|
||||
@Composable
|
||||
|
@ -29,11 +29,11 @@ fun AddButton(
|
|||
Logger.info("No file selected.")
|
||||
})
|
||||
},
|
||||
backgroundColor = WrenchColors.LIGHT,
|
||||
backgroundColor = UIColors.LIGHT,
|
||||
) {
|
||||
Icon(
|
||||
Icons.Filled.Add,
|
||||
tint = Color.White,
|
||||
tint = Color.Green,
|
||||
contentDescription = "Add file...",
|
||||
modifier = Modifier.size(28.dp)
|
||||
)
|
||||
|
|
|
@ -15,7 +15,7 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.draw.shadow
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import xyz.atnrch.wrench.colors.WrenchColors
|
||||
import xyz.atnrch.wrench.ui.UIColors
|
||||
import xyz.atnrch.wrench.watcher.Watcher
|
||||
|
||||
@Composable
|
||||
|
@ -38,18 +38,19 @@ fun BottomRow(
|
|||
onStateChange(true)
|
||||
}
|
||||
},
|
||||
colors = ButtonDefaults.buttonColors(WrenchColors.LIGHT, Color.White),
|
||||
colors = ButtonDefaults.buttonColors(UIColors.LIGHT, Color.White),
|
||||
contentPadding = ButtonDefaults.ContentPadding,
|
||||
shape = RoundedCornerShape(100),
|
||||
modifier = Modifier.shadow(15.dp, RoundedCornerShape(100), false)
|
||||
) {
|
||||
if (state) Icon(
|
||||
Icons.Filled.Close,
|
||||
tint = UIColors.STRESS,
|
||||
contentDescription = "Stop",
|
||||
modifier = Modifier.size(28.dp)
|
||||
) else Icon(
|
||||
Icons.Filled.PlayArrow,
|
||||
tint = Color.White,
|
||||
tint = Color.Green,
|
||||
contentDescription = "Start",
|
||||
modifier = Modifier.size(28.dp)
|
||||
)
|
||||
|
|
|
@ -11,6 +11,7 @@ import androidx.compose.ui.graphics.RectangleShape
|
|||
import androidx.compose.ui.unit.ExperimentalUnitApi
|
||||
import androidx.compose.ui.unit.dp
|
||||
import xyz.atnrch.wrench.components.debug.DummyTextEntry
|
||||
import xyz.atnrch.wrench.ui.UIColors
|
||||
import xyz.atnrch.wrench.watcher.WatcherManager
|
||||
|
||||
@OptIn(ExperimentalUnitApi::class)
|
||||
|
@ -19,10 +20,13 @@ fun WatcherDisplay(
|
|||
watcherManager: WatcherManager
|
||||
) {
|
||||
var selectedFile = remember { mutableStateOf("") }
|
||||
Column {
|
||||
|
||||
Box(
|
||||
contentAlignment = Alignment.CenterStart,
|
||||
modifier = Modifier.fillMaxSize(50F).border(BorderStroke(8.dp, Color.Black), RectangleShape),
|
||||
contentAlignment = Alignment.Center,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth(0.5f)
|
||||
.fillMaxHeight(1f)
|
||||
.border(BorderStroke(4.dp, Color.Black), RectangleShape),
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier.padding(24.dp)
|
||||
|
@ -36,9 +40,14 @@ fun WatcherDisplay(
|
|||
DummyTextEntry()
|
||||
}
|
||||
}
|
||||
|
||||
Box {
|
||||
Box(
|
||||
contentAlignment = Alignment.CenterEnd,
|
||||
modifier = Modifier.fillMaxSize(50F),
|
||||
contentAlignment = Alignment.Center,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth(0.5f)
|
||||
.fillMaxHeight(1f)
|
||||
.border(BorderStroke(4.dp, UIColors.STRESS), RectangleShape),
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier.padding(24.dp)
|
||||
|
@ -46,6 +55,7 @@ fun WatcherDisplay(
|
|||
//.............
|
||||
// OUTPUT SIDE
|
||||
//.............
|
||||
DummyTextEntry()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ import androidx.compose.ui.window.Dialog
|
|||
|
||||
@Composable
|
||||
fun EntryDialog(
|
||||
onCancelClick: () -> Unit,
|
||||
onStateChange: (state: Boolean) -> Unit
|
||||
) {
|
||||
Dialog(
|
||||
|
@ -29,7 +28,7 @@ fun EntryDialog(
|
|||
modifier = Modifier.fillMaxWidth()
|
||||
) {
|
||||
|
||||
TextButton(onClick = onCancelClick) {
|
||||
TextButton(onClick = { onStateChange(false) }) {
|
||||
Text(text = "Cancel")
|
||||
}
|
||||
Spacer(modifier = Modifier.width(4.dp))
|
||||
|
|
Reference in a new issue