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