style: button color
This commit is contained in:
parent
9942081449
commit
1791010676
9 changed files with 35 additions and 24 deletions
|
@ -23,7 +23,7 @@ fun AppBottomBar(
|
|||
cutoutShape = MaterialTheme.shapes.small.copy(
|
||||
CornerSize(percent = 50)
|
||||
),
|
||||
backgroundColor = UIColors.DARK
|
||||
backgroundColor = UIColors.DARK_PRIMARY
|
||||
) {
|
||||
FileBottomRow(minMode, watcherManager, watcher, currentClick, outputs, onCurrentClick)
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ fun AddOutputButton(
|
|||
Logger.info("No file selected.")
|
||||
})
|
||||
},
|
||||
colors = ButtonDefaults.buttonColors(UIColors.DARK, Color.White),
|
||||
colors = ButtonDefaults.buttonColors(UIColors.DARK_PRIMARY, Color.White),
|
||||
contentPadding = PaddingValues(
|
||||
start = 14.dp,
|
||||
top = 6.dp,
|
||||
|
|
|
@ -30,7 +30,7 @@ fun FloatingButton(
|
|||
Logger.info("No file selected.")
|
||||
})
|
||||
},
|
||||
backgroundColor = UIColors.DARK,
|
||||
backgroundColor = UIColors.DARK_PRIMARY,
|
||||
modifier = Modifier.border(
|
||||
4.dp,
|
||||
UIColors.ORANGE,
|
||||
|
|
|
@ -26,7 +26,7 @@ fun MoveFilesButton(
|
|||
) {
|
||||
Button(
|
||||
onClick = { watcher.move() },
|
||||
colors = ButtonDefaults.buttonColors(UIColors.DARK, Color.White),
|
||||
colors = ButtonDefaults.buttonColors(UIColors.DARK_PRIMARY, Color.White),
|
||||
contentPadding = PaddingValues(
|
||||
start = 14.dp,
|
||||
top = 6.dp,
|
||||
|
|
|
@ -37,7 +37,7 @@ fun RemoveOutputButton(
|
|||
ACTIVE_COMPOSABLE = -1
|
||||
onCurrentClick.invoke(-1)
|
||||
},
|
||||
colors = ButtonDefaults.buttonColors(UIColors.DARK, Color.White),
|
||||
colors = ButtonDefaults.buttonColors(UIColors.DARK_PRIMARY, Color.White),
|
||||
contentPadding = PaddingValues(
|
||||
start = 14.dp,
|
||||
top = 6.dp,
|
||||
|
@ -45,12 +45,12 @@ fun RemoveOutputButton(
|
|||
bottom = 6.dp
|
||||
),
|
||||
shape = RoundedCornerShape(100),
|
||||
border = BorderStroke(2.dp, UIColors.STRESS),
|
||||
border = BorderStroke(2.dp, UIColors.LIGHT_RED),
|
||||
modifier = Modifier.shadow(24.dp, RoundedCornerShape(100), false)
|
||||
) {
|
||||
Icon(
|
||||
Icons.Filled.Delete,
|
||||
tint = UIColors.STRESS,
|
||||
tint = UIColors.LIGHT_RED,
|
||||
contentDescription = "Remove file",
|
||||
modifier = Modifier.size(22.dp)
|
||||
)
|
||||
|
|
|
@ -31,7 +31,7 @@ fun OutputEntries(
|
|||
modifier = Modifier
|
||||
.fillMaxHeight()
|
||||
.fillMaxWidth()
|
||||
.border(BorderStroke(4.dp, UIColors.STRESS), RectangleShape)
|
||||
.border(BorderStroke(4.dp, UIColors.LIGHT_RED), RectangleShape)
|
||||
) {
|
||||
OutputTopText()
|
||||
Column(
|
||||
|
|
|
@ -24,7 +24,7 @@ fun TopBar(
|
|||
values: MutableCollection<WatcherEntry>
|
||||
) {
|
||||
TopAppBar(
|
||||
backgroundColor = UIColors.DARK,
|
||||
backgroundColor = UIColors.DARK_PRIMARY,
|
||||
contentColor = Color.White,
|
||||
elevation = 16.dp,
|
||||
title = {
|
||||
|
|
|
@ -3,10 +3,13 @@ package xyz.atnrch.wrench.gui.filemanager.top
|
|||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.material.Button
|
||||
import androidx.compose.material.ButtonDefaults
|
||||
import androidx.compose.material.Text
|
||||
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.gui.style.UIColors
|
||||
import xyz.atnrch.wrench.json.JsonLayout
|
||||
import xyz.atnrch.wrench.json.SerializedWatcherEntry
|
||||
import xyz.atnrch.wrench.watcher.WatcherEntry
|
||||
|
@ -17,13 +20,17 @@ fun TopBarButtons(
|
|||
jsonLayout: JsonLayout,
|
||||
values: MutableCollection<WatcherEntry>
|
||||
) {
|
||||
Button(onClick = {
|
||||
Button(
|
||||
colors = ButtonDefaults.buttonColors(UIColors.DARK_GREEN, Color.White),
|
||||
onClick = {
|
||||
jsonLayout.writeLayout(SerializedWatcherEntry.fromUnserializedEntries(values.toList()))
|
||||
}) {
|
||||
Text("Save")
|
||||
}
|
||||
Spacer(Modifier.width(10.dp))
|
||||
Button(onClick = {
|
||||
Button(
|
||||
colors = ButtonDefaults.buttonColors(UIColors.DARK_GREEN, Color.White),
|
||||
onClick = {
|
||||
values.clear()
|
||||
// not the cleanest way of doing things
|
||||
// but tbh I'm tired after working on serialization
|
||||
|
|
|
@ -4,11 +4,15 @@ import androidx.compose.ui.graphics.Color
|
|||
|
||||
class UIColors {
|
||||
companion object {
|
||||
val DARK = Color(0XFF1B1B1B)
|
||||
val PRIMARY = Color(0xFF242424)
|
||||
val LIGHT = Color(0xFF6D6D6D)
|
||||
val STRESS = Color(0xFFF44336)
|
||||
val DARK_PRIMARY = Color(0XFF1B1B1B)
|
||||
val LIGHT_PRIMARY = Color(0xFF6D6D6D)
|
||||
|
||||
val LIGHT_RED = Color(0xFFF44336)
|
||||
|
||||
val GREEN = Color(0xFF64BA69)
|
||||
val DARK_GREEN = Color(0xFF558b2f)
|
||||
|
||||
val ORANGE = Color(0xFFFFB300)
|
||||
}
|
||||
}
|
Reference in a new issue