Added a new color scheme and fixed multiple theming issues
This commit is contained in:
parent
592a5c3179
commit
d6ad3b3187
@ -4,17 +4,11 @@ package app
|
|||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
|
||||||
import androidx.compose.foundation.lazy.items
|
|
||||||
import androidx.compose.material.*
|
import androidx.compose.material.*
|
||||||
import androidx.compose.material.icons.Icons
|
|
||||||
import androidx.compose.material.icons.filled.Add
|
|
||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.ExperimentalComposeUiApi
|
import androidx.compose.ui.ExperimentalComposeUiApi
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.alpha
|
|
||||||
import androidx.compose.ui.graphics.Color
|
|
||||||
import androidx.compose.ui.input.pointer.PointerIconDefaults
|
import androidx.compose.ui.input.pointer.PointerIconDefaults
|
||||||
import androidx.compose.ui.input.pointer.pointerHoverIcon
|
import androidx.compose.ui.input.pointer.pointerHoverIcon
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
@ -25,7 +19,6 @@ import androidx.compose.ui.window.Window
|
|||||||
import androidx.compose.ui.window.WindowPlacement
|
import androidx.compose.ui.window.WindowPlacement
|
||||||
import androidx.compose.ui.window.application
|
import androidx.compose.ui.window.application
|
||||||
import androidx.compose.ui.window.rememberWindowState
|
import androidx.compose.ui.window.rememberWindowState
|
||||||
import androidx.compose.ui.zIndex
|
|
||||||
import app.di.DaggerAppComponent
|
import app.di.DaggerAppComponent
|
||||||
import app.theme.AppTheme
|
import app.theme.AppTheme
|
||||||
import app.theme.primaryTextColor
|
import app.theme.primaryTextColor
|
||||||
@ -75,7 +68,7 @@ class App {
|
|||||||
) {
|
) {
|
||||||
var showSettingsDialog by remember { mutableStateOf(false) }
|
var showSettingsDialog by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
AppTheme(theme = theme) {
|
AppTheme(selectedTheme = theme) {
|
||||||
Box(modifier = Modifier.background(MaterialTheme.colors.background)) {
|
Box(modifier = Modifier.background(MaterialTheme.colors.background)) {
|
||||||
AppTabs(
|
AppTabs(
|
||||||
onOpenSettings = {
|
onOpenSettings = {
|
||||||
@ -213,7 +206,7 @@ class App {
|
|||||||
painter = painterResource("settings.svg"),
|
painter = painterResource("settings.svg"),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
tint = MaterialTheme.colors.primary,
|
tint = MaterialTheme.colors.primaryVariant,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,12 @@ class AppPreferences @Inject constructor() {
|
|||||||
var theme: Themes
|
var theme: Themes
|
||||||
get() {
|
get() {
|
||||||
val lastTheme = preferences.get(PREF_THEME, Themes.DARK.toString())
|
val lastTheme = preferences.get(PREF_THEME, Themes.DARK.toString())
|
||||||
return Themes.valueOf(lastTheme)
|
return try {
|
||||||
|
Themes.valueOf(lastTheme)
|
||||||
|
} catch (ex: Exception) {
|
||||||
|
ex.printStackTrace()
|
||||||
|
Themes.DARK
|
||||||
|
}
|
||||||
}
|
}
|
||||||
set(value) {
|
set(value) {
|
||||||
preferences.put(PREF_THEME, value.toString())
|
preferences.put(PREF_THEME, value.toString())
|
||||||
|
@ -2,38 +2,75 @@ package app.theme
|
|||||||
|
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
||||||
val primaryLight = Color(0xFF9FD1FF)
|
val lightTheme = ColorsScheme(
|
||||||
val primary = Color(0xFF0070D8)
|
primary = Color(0xFF0070D8),
|
||||||
val primaryDark = Color(0xFF014F97)
|
primaryVariant = Color(0xFF0070D8),
|
||||||
val onPrimary = Color(0xFFFFFFFFF)
|
onPrimary = Color(0xFFFFFFFFF),
|
||||||
val secondaryLight = Color(0xFF9c27b0)
|
secondary = Color(0xFF9c27b0),
|
||||||
val secondaryDark = Color(0xFFe9c754)
|
primaryText = Color(0xFF212934),
|
||||||
val mainText = Color(0xFF212934)
|
secondaryText = Color(0xFF595858),
|
||||||
val mainTextDark = Color(0xFFFFFFFF)
|
error = Color(0xFFc93838),
|
||||||
val secondaryText = Color(0xFF595858)
|
onError = Color(0xFFFFFFFF),
|
||||||
val secondaryTextDark = Color(0xFFCCCBCB)
|
background = Color(0xFFFFFFFF),
|
||||||
val borderColorLight = Color(0xFF989898)
|
backgroundSelected = Color(0xFFcee1f2),
|
||||||
val borderColorDark = Color(0xFF989898)
|
surface = Color(0xFFe9ecf7),
|
||||||
val errorColor = Color(0xFFc93838)
|
headerBackground = Color(0xFFF4F6FA),
|
||||||
val onErrorColor = Color(0xFFFFFFFF)
|
borderColor = Color(0xFF989898),
|
||||||
|
graphHeaderBackground = Color(0xFFF4F6FA),
|
||||||
|
addFile = Color(0xFF32A852),
|
||||||
|
deletedFile = Color(0xFFc93838),
|
||||||
|
modifiedFile = Color(0xFF0070D8),
|
||||||
|
conflictingFile = Color(0xFFFFB638),
|
||||||
|
dialogOverlay = Color(0xAA000000),
|
||||||
|
normalScrollbar = Color(0xFFCCCCCC),
|
||||||
|
hoverScrollbar = Color(0xFF0070D8),
|
||||||
|
)
|
||||||
|
|
||||||
val backgroundColorLight = Color(0xFFFFFFFF)
|
|
||||||
val backgroundColorSelectedLight = Color(0xFFcee1f2)
|
|
||||||
val backgroundColorDark = Color(0xFF0E1621)
|
|
||||||
val backgroundColorSelectedDark = Color(0xFF2f3640)
|
|
||||||
val surfaceColorLight = Color(0xFFe9ecf7)
|
|
||||||
val surfaceColorDark = Color(0xFF182533)
|
|
||||||
val headerBackgroundLight = Color(0xFFF4F6FA)
|
|
||||||
val graphHeaderBackgroundDark = Color(0xFF303132)
|
|
||||||
val headerBackgroundDark = Color(0xFF0a2b4a)
|
|
||||||
|
|
||||||
val addFileLight = Color(0xFF32A852)
|
val darkBlueTheme = ColorsScheme(
|
||||||
val deleteFileLight = errorColor
|
primary = Color(0xFF014F97),
|
||||||
val modifyFileLight = primary
|
primaryVariant = Color(0xFF9FD1FF),
|
||||||
val conflictFileLight = Color(0xFFFFB638)
|
onPrimary = Color(0xFFFFFFFFF),
|
||||||
|
secondary = Color(0xFFe9c754),
|
||||||
|
primaryText = Color(0xFFFFFFFF),
|
||||||
|
secondaryText = Color(0xFFCCCBCB),
|
||||||
|
error = Color(0xFFc93838),
|
||||||
|
onError = Color(0xFFFFFFFF),
|
||||||
|
background = Color(0xFF0E1621),
|
||||||
|
backgroundSelected = Color(0xFF2f3640),
|
||||||
|
surface = Color(0xFF182533),
|
||||||
|
headerBackground = Color(0xFF0a2b4a),
|
||||||
|
borderColor = Color(0xFF989898),
|
||||||
|
graphHeaderBackground = Color(0xFF303132),
|
||||||
|
addFile = Color(0xFF32A852),
|
||||||
|
deletedFile = Color(0xFFc93838),
|
||||||
|
modifiedFile = Color(0xFF0070D8),
|
||||||
|
conflictingFile = Color(0xFFFFB638),
|
||||||
|
dialogOverlay = Color(0xAA000000),
|
||||||
|
normalScrollbar = Color(0xFFCCCCCC),
|
||||||
|
hoverScrollbar = Color(0xFF888888)
|
||||||
|
)
|
||||||
|
|
||||||
val dialogBackgroundColor = Color(0xAA000000)
|
val darkTheme = ColorsScheme(
|
||||||
val unhoverScrollbarColorLight = Color.LightGray
|
primary = Color(0xFF014F97),
|
||||||
val unhoverScrollbarColorDark = Color.Gray
|
primaryVariant = Color(0xFFCDEAFF),
|
||||||
val hoverScrollbarColorLight = primary
|
onPrimary = Color(0xFFFFFFFFF),
|
||||||
val hoverScrollbarColorDark = Color.LightGray
|
secondary = Color(0xFFe9c754),
|
||||||
|
primaryText = Color(0xFFFFFFFF),
|
||||||
|
secondaryText = Color(0xFFCCCBCB),
|
||||||
|
error = Color(0xFFc93838),
|
||||||
|
onError = Color(0xFFFFFFFF),
|
||||||
|
background = Color(0xFF16181F),
|
||||||
|
backgroundSelected = Color(0xFF2f3640),
|
||||||
|
surface = Color(0xFF202330),
|
||||||
|
headerBackground = Color(0xFF131E44),
|
||||||
|
borderColor = Color(0xFF989898),
|
||||||
|
graphHeaderBackground = Color(0xFF303132),
|
||||||
|
addFile = Color(0xFF32A852),
|
||||||
|
deletedFile = Color(0xFFc93838),
|
||||||
|
modifiedFile = Color(0xFF0070D8),
|
||||||
|
conflictingFile = Color(0xFFFFB638),
|
||||||
|
dialogOverlay = Color(0xAA000000),
|
||||||
|
normalScrollbar = Color(0xFFCCCCCC),
|
||||||
|
hoverScrollbar = Color(0xFF888888)
|
||||||
|
)
|
47
src/main/kotlin/app/theme/ColorsScheme.kt
Normal file
47
src/main/kotlin/app/theme/ColorsScheme.kt
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
package app.theme
|
||||||
|
|
||||||
|
import androidx.compose.material.Colors
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
||||||
|
data class ColorsScheme(
|
||||||
|
val primary: Color,
|
||||||
|
val primaryVariant: Color,
|
||||||
|
val onPrimary: Color,
|
||||||
|
val secondary: Color,
|
||||||
|
val primaryText: Color,
|
||||||
|
val secondaryText: Color,
|
||||||
|
val error: Color,
|
||||||
|
val onError: Color,
|
||||||
|
val background: Color,
|
||||||
|
val backgroundSelected: Color,
|
||||||
|
val surface: Color,
|
||||||
|
val headerBackground: Color,
|
||||||
|
val onHeader: Color = primaryText,
|
||||||
|
val borderColor: Color,
|
||||||
|
val graphHeaderBackground: Color,
|
||||||
|
val addFile: Color,
|
||||||
|
val deletedFile: Color,
|
||||||
|
val modifiedFile: Color,
|
||||||
|
val conflictingFile: Color,
|
||||||
|
val dialogOverlay: Color,
|
||||||
|
val normalScrollbar: Color,
|
||||||
|
val hoverScrollbar: Color,
|
||||||
|
) {
|
||||||
|
fun toComposeColors(): Colors {
|
||||||
|
return Colors(
|
||||||
|
primary = this.primary,
|
||||||
|
primaryVariant = this.primaryVariant,
|
||||||
|
secondary = this.secondary,
|
||||||
|
secondaryVariant = this.secondary,
|
||||||
|
background = this.background,
|
||||||
|
surface = this.surface,
|
||||||
|
error = this.error,
|
||||||
|
onPrimary = this.onPrimary,
|
||||||
|
onSecondary = this.onPrimary,
|
||||||
|
onBackground = this.primaryText,
|
||||||
|
onSurface = this.primaryText,
|
||||||
|
onError = this.onError,
|
||||||
|
isLight = true, // todo what is this used for? Hardcoded value for now
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
29
src/main/kotlin/app/theme/ComponentsColors.kt
Normal file
29
src/main/kotlin/app/theme/ComponentsColors.kt
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package app.theme
|
||||||
|
|
||||||
|
import androidx.compose.material.ButtonDefaults
|
||||||
|
import androidx.compose.material.MaterialTheme
|
||||||
|
import androidx.compose.material.TextFieldDefaults
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun textFieldColors() = TextFieldDefaults.textFieldColors(
|
||||||
|
cursorColor = MaterialTheme.colors.primaryVariant,
|
||||||
|
focusedIndicatorColor = MaterialTheme.colors.primaryVariant,
|
||||||
|
focusedLabelColor = MaterialTheme.colors.primaryVariant,
|
||||||
|
backgroundColor = MaterialTheme.colors.background,
|
||||||
|
textColor = MaterialTheme.colors.primaryTextColor,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun outlinedTextFieldColors() = TextFieldDefaults.outlinedTextFieldColors(
|
||||||
|
cursorColor = MaterialTheme.colors.primaryVariant,
|
||||||
|
focusedBorderColor = MaterialTheme.colors.primaryVariant,
|
||||||
|
focusedLabelColor = MaterialTheme.colors.primaryVariant,
|
||||||
|
backgroundColor = MaterialTheme.colors.background,
|
||||||
|
textColor = MaterialTheme.colors.primaryTextColor,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun textButtonColors() = ButtonDefaults.textButtonColors(
|
||||||
|
contentColor = MaterialTheme.colors.primaryVariant
|
||||||
|
)
|
@ -1,44 +1,27 @@
|
|||||||
|
@file:Suppress("unused")
|
||||||
|
|
||||||
package app.theme
|
package app.theme
|
||||||
|
|
||||||
import androidx.compose.material.Colors
|
import androidx.compose.material.Colors
|
||||||
import androidx.compose.material.MaterialTheme
|
import androidx.compose.material.MaterialTheme
|
||||||
import androidx.compose.material.darkColors
|
|
||||||
import androidx.compose.material.lightColors
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import app.DropDownOption
|
import app.DropDownOption
|
||||||
|
|
||||||
private val DarkColorPalette = darkColors(
|
private var appTheme: ColorsScheme = darkTheme
|
||||||
primary = primaryLight,
|
|
||||||
primaryVariant = primaryDark,
|
|
||||||
secondary = secondaryDark,
|
|
||||||
surface = surfaceColorDark,
|
|
||||||
background = backgroundColorDark,
|
|
||||||
error = errorColor,
|
|
||||||
onError = onErrorColor,
|
|
||||||
onPrimary = onPrimary,
|
|
||||||
)
|
|
||||||
|
|
||||||
private val LightColorPalette = lightColors(
|
|
||||||
primary = primary,
|
|
||||||
primaryVariant = primaryDark,
|
|
||||||
secondary = secondaryLight,
|
|
||||||
background = backgroundColorLight,
|
|
||||||
surface = surfaceColorLight,
|
|
||||||
error = errorColor,
|
|
||||||
onError = onErrorColor,
|
|
||||||
onPrimary = onPrimary,
|
|
||||||
)
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun AppTheme(theme: Themes = Themes.LIGHT, content: @Composable() () -> Unit) {
|
fun AppTheme(selectedTheme: Themes = Themes.DARK, content: @Composable() () -> Unit) {
|
||||||
val colors = when (theme) {
|
val theme = when (selectedTheme) {
|
||||||
Themes.LIGHT -> LightColorPalette
|
Themes.LIGHT -> lightTheme
|
||||||
Themes.DARK -> DarkColorPalette
|
Themes.DARK -> darkTheme
|
||||||
|
Themes.DARK_BLUE -> darkBlueTheme
|
||||||
}
|
}
|
||||||
|
|
||||||
|
appTheme = theme
|
||||||
|
|
||||||
MaterialTheme(
|
MaterialTheme(
|
||||||
colors = colors,
|
colors = theme.toComposeColors(),
|
||||||
content = content,
|
content = content,
|
||||||
typography = typography,
|
typography = typography,
|
||||||
)
|
)
|
||||||
@ -46,99 +29,71 @@ fun AppTheme(theme: Themes = Themes.LIGHT, content: @Composable() () -> Unit) {
|
|||||||
|
|
||||||
@get:Composable
|
@get:Composable
|
||||||
val Colors.backgroundSelected: Color
|
val Colors.backgroundSelected: Color
|
||||||
get() = if (isLight) backgroundColorSelectedLight else backgroundColorSelectedDark
|
get() = appTheme.backgroundSelected
|
||||||
|
|
||||||
@get:Composable
|
@get:Composable
|
||||||
val Colors.primaryTextColor: Color
|
val Colors.primaryTextColor: Color
|
||||||
get() = if (isLight) mainText else mainTextDark
|
get() = appTheme.primaryText
|
||||||
|
|
||||||
@get:Composable
|
|
||||||
val Colors.halfPrimary: Color
|
|
||||||
get() = primary.copy(alpha = 0.8f)
|
|
||||||
|
|
||||||
@get:Composable
|
|
||||||
val Colors.inversePrimaryTextColor: Color
|
|
||||||
get() = if (isLight) mainTextDark else mainText
|
|
||||||
|
|
||||||
@get:Composable
|
@get:Composable
|
||||||
val Colors.secondaryTextColor: Color
|
val Colors.secondaryTextColor: Color
|
||||||
get() = if (isLight) secondaryText else secondaryTextDark
|
get() = appTheme.secondaryText
|
||||||
|
|
||||||
@get:Composable
|
@get:Composable
|
||||||
val Colors.borderColor: Color
|
val Colors.borderColor: Color
|
||||||
get() = if (isLight)
|
get() = appTheme.borderColor
|
||||||
borderColorLight
|
|
||||||
else
|
|
||||||
borderColorDark
|
|
||||||
|
|
||||||
@get:Composable
|
@get:Composable
|
||||||
val Colors.headerBackground: Color
|
val Colors.headerBackground: Color
|
||||||
get() {
|
get() = appTheme.headerBackground
|
||||||
return if (isLight)
|
|
||||||
headerBackgroundLight
|
|
||||||
else
|
|
||||||
headerBackgroundDark
|
|
||||||
}
|
|
||||||
|
|
||||||
@get:Composable
|
@get:Composable
|
||||||
val Colors.graphHeaderBackground: Color
|
val Colors.graphHeaderBackground: Color
|
||||||
get() {
|
get() = appTheme.graphHeaderBackground
|
||||||
return if (isLight)
|
|
||||||
headerBackgroundLight
|
|
||||||
else
|
|
||||||
graphHeaderBackgroundDark
|
|
||||||
}
|
|
||||||
|
|
||||||
@get:Composable
|
@get:Composable
|
||||||
val Colors.addFile: Color
|
val Colors.addFile: Color
|
||||||
get() = addFileLight
|
get() = appTheme.addFile
|
||||||
|
|
||||||
@get:Composable
|
@get:Composable
|
||||||
val Colors.deleteFile: Color
|
val Colors.deleteFile: Color
|
||||||
get() = deleteFileLight
|
get() = appTheme.deletedFile
|
||||||
|
|
||||||
@get:Composable
|
@get:Composable
|
||||||
val Colors.modifyFile: Color
|
val Colors.modifyFile: Color
|
||||||
get() = modifyFileLight
|
get() = appTheme.modifiedFile
|
||||||
|
|
||||||
@get:Composable
|
@get:Composable
|
||||||
val Colors.conflictFile: Color
|
val Colors.conflictFile: Color
|
||||||
get() = conflictFileLight
|
get() = appTheme.conflictingFile
|
||||||
|
|
||||||
@get:Composable
|
@get:Composable
|
||||||
val Colors.headerText: Color
|
val Colors.headerText: Color
|
||||||
get() = if (isLight) primary else mainTextDark
|
get() = appTheme.onHeader
|
||||||
|
|
||||||
|
|
||||||
val Colors.tabColorActive: Color
|
|
||||||
get() = if (isLight) surfaceColorLight else surfaceColorDark
|
|
||||||
|
|
||||||
|
|
||||||
val Colors.tabColorInactive: Color
|
|
||||||
get() = if (isLight) backgroundColorLight else backgroundColorDark
|
|
||||||
|
|
||||||
val Colors.stageButton: Color
|
val Colors.stageButton: Color
|
||||||
get() = if (isLight) primary else primaryDark
|
get() = appTheme.primary
|
||||||
|
|
||||||
val Colors.unstageButton: Color
|
val Colors.unstageButton: Color
|
||||||
get() = error
|
get() = appTheme.error
|
||||||
|
|
||||||
val Colors.abortButton: Color
|
val Colors.abortButton: Color
|
||||||
get() = error
|
get() = appTheme.error
|
||||||
|
|
||||||
val Colors.confirmationButton: Color
|
val Colors.scrollbarNormal: Color
|
||||||
get() = if (isLight) primary else primaryDark
|
get() = appTheme.normalScrollbar
|
||||||
|
|
||||||
val Colors.scrollbarUnhover: Color
|
|
||||||
get() = if (isLight) unhoverScrollbarColorLight else unhoverScrollbarColorDark
|
|
||||||
|
|
||||||
val Colors.scrollbarHover: Color
|
val Colors.scrollbarHover: Color
|
||||||
get() = if (isLight) hoverScrollbarColorLight else hoverScrollbarColorDark
|
get() = appTheme.hoverScrollbar
|
||||||
|
|
||||||
|
val Colors.dialogOverlay: Color
|
||||||
|
get() = appTheme.dialogOverlay
|
||||||
|
|
||||||
|
|
||||||
enum class Themes(val displayName: String) : DropDownOption {
|
enum class Themes(val displayName: String) : DropDownOption {
|
||||||
LIGHT("Light"),
|
LIGHT("Light"),
|
||||||
DARK("Dark");
|
DARK("Dark"),
|
||||||
|
DARK_BLUE("Dark blue");
|
||||||
|
|
||||||
override val optionName: String
|
override val optionName: String
|
||||||
get() = displayName
|
get() = displayName
|
||||||
@ -147,4 +102,5 @@ enum class Themes(val displayName: String) : DropDownOption {
|
|||||||
val themesList = listOf(
|
val themesList = listOf(
|
||||||
Themes.LIGHT,
|
Themes.LIGHT,
|
||||||
Themes.DARK,
|
Themes.DARK,
|
||||||
|
Themes.DARK_BLUE,
|
||||||
)
|
)
|
@ -61,7 +61,8 @@ fun AppTab(
|
|||||||
LinearProgressIndicator(
|
LinearProgressIndicator(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.alpha(linearProgressAlpha)
|
.alpha(linearProgressAlpha),
|
||||||
|
color = MaterialTheme.colors.primaryVariant
|
||||||
)
|
)
|
||||||
|
|
||||||
CredentialsDialog(tabViewModel)
|
CredentialsDialog(tabViewModel)
|
||||||
|
@ -114,7 +114,7 @@ private fun BranchLineEntry(
|
|||||||
painter = painterResource("location.svg"),
|
painter = painterResource("location.svg"),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
modifier = Modifier.padding(horizontal = 4.dp),
|
modifier = Modifier.padding(horizontal = 4.dp),
|
||||||
tint = MaterialTheme.colors.primary,
|
tint = MaterialTheme.colors.primaryVariant,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ fun CommitChanges(
|
|||||||
|
|
||||||
when (val commitChangesStatus = commitChangesStatusState.value) {
|
when (val commitChangesStatus = commitChangesStatusState.value) {
|
||||||
CommitChangesStatus.Loading -> {
|
CommitChangesStatus.Loading -> {
|
||||||
LinearProgressIndicator(modifier = Modifier.fillMaxWidth())
|
LinearProgressIndicator(modifier = Modifier.fillMaxWidth(), color = MaterialTheme.colors.primaryVariant)
|
||||||
}
|
}
|
||||||
is CommitChangesStatus.Loaded -> {
|
is CommitChangesStatus.Loaded -> {
|
||||||
CommitChangesView(
|
CommitChangesView(
|
||||||
|
@ -97,7 +97,7 @@ fun Diff(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ViewDiffResult.Loading, ViewDiffResult.None -> {
|
ViewDiffResult.Loading, ViewDiffResult.None -> {
|
||||||
LinearProgressIndicator(modifier = Modifier.fillMaxWidth())
|
LinearProgressIndicator(modifier = Modifier.fillMaxWidth(), color = MaterialTheme.colors.primaryVariant)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,9 +146,9 @@ fun MenuButton(
|
|||||||
onClick: () -> Unit
|
onClick: () -> Unit
|
||||||
) {
|
) {
|
||||||
val iconColor = if (enabled) {
|
val iconColor = if (enabled) {
|
||||||
MaterialTheme.colors.primary
|
MaterialTheme.colors.primaryVariant
|
||||||
} else {
|
} else {
|
||||||
MaterialTheme.colors.secondaryVariant
|
MaterialTheme.colors.secondaryVariant //todo this color isn't specified anywhere
|
||||||
}
|
}
|
||||||
|
|
||||||
Box(
|
Box(
|
||||||
@ -189,7 +189,7 @@ fun ExtendedMenuButton(
|
|||||||
extendedListItems: List<DropDownContentData>,
|
extendedListItems: List<DropDownContentData>,
|
||||||
) {
|
) {
|
||||||
val iconColor = if (enabled) {
|
val iconColor = if (enabled) {
|
||||||
MaterialTheme.colors.primary
|
MaterialTheme.colors.primaryVariant
|
||||||
} else {
|
} else {
|
||||||
MaterialTheme.colors.secondaryVariant
|
MaterialTheme.colors.secondaryVariant
|
||||||
}
|
}
|
||||||
@ -263,7 +263,7 @@ fun IconMenuButton(
|
|||||||
onClick: () -> Unit
|
onClick: () -> Unit
|
||||||
) {
|
) {
|
||||||
val iconColor = if (enabled) {
|
val iconColor = if (enabled) {
|
||||||
MaterialTheme.colors.primary
|
MaterialTheme.colors.primaryVariant
|
||||||
} else {
|
} else {
|
||||||
MaterialTheme.colors.secondaryVariant
|
MaterialTheme.colors.secondaryVariant
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,9 @@ import androidx.compose.ui.Modifier
|
|||||||
import androidx.compose.ui.text.TextStyle
|
import androidx.compose.ui.text.TextStyle
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
|
import app.theme.outlinedTextFieldColors
|
||||||
import app.theme.primaryTextColor
|
import app.theme.primaryTextColor
|
||||||
|
import app.theme.textButtonColors
|
||||||
import app.ui.components.PrimaryButton
|
import app.ui.components.PrimaryButton
|
||||||
import app.ui.components.ScrollableLazyColumn
|
import app.ui.components.ScrollableLazyColumn
|
||||||
import app.viewmodels.RebaseInteractiveState
|
import app.viewmodels.RebaseInteractiveState
|
||||||
@ -88,7 +90,8 @@ fun RebaseStateLoaded(
|
|||||||
modifier = Modifier.padding(end = 8.dp),
|
modifier = Modifier.padding(end = 8.dp),
|
||||||
onClick = {
|
onClick = {
|
||||||
onCancel()
|
onCancel()
|
||||||
}
|
},
|
||||||
|
colors = textButtonColors(),
|
||||||
) {
|
) {
|
||||||
Text("Cancel")
|
Text("Cancel")
|
||||||
}
|
}
|
||||||
@ -139,7 +142,7 @@ fun RebaseCommit(
|
|||||||
newMessage = it
|
newMessage = it
|
||||||
onMessageChanged(it)
|
onMessageChanged(it)
|
||||||
},
|
},
|
||||||
colors = TextFieldDefaults.textFieldColors(backgroundColor = MaterialTheme.colors.background),
|
colors = outlinedTextFieldColors(),
|
||||||
textStyle = TextStyle.Default.copy(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
textStyle = TextStyle.Default.copy(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ fun UncommitedChanges(
|
|||||||
enter = fadeIn(),
|
enter = fadeIn(),
|
||||||
exit = fadeOut(),
|
exit = fadeOut(),
|
||||||
) {
|
) {
|
||||||
LinearProgressIndicator(modifier = Modifier.fillMaxWidth())
|
LinearProgressIndicator(modifier = Modifier.fillMaxWidth(), color = MaterialTheme.colors.primaryVariant)
|
||||||
}
|
}
|
||||||
|
|
||||||
EntriesList(
|
EntriesList(
|
||||||
@ -178,7 +178,7 @@ fun UncommitedChanges(
|
|||||||
statusViewModel.savedCommitMessage = it
|
statusViewModel.savedCommitMessage = it
|
||||||
},
|
},
|
||||||
label = { Text("Write your commit message here", fontSize = 14.sp) },
|
label = { Text("Write your commit message here", fontSize = 14.sp) },
|
||||||
colors = TextFieldDefaults.textFieldColors(backgroundColor = MaterialTheme.colors.background),
|
colors = textFieldColors(),
|
||||||
textStyle = TextStyle.Default.copy(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
textStyle = TextStyle.Default.copy(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -237,7 +237,7 @@ fun UncommitedChangesButtons(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.height(40.dp)
|
.height(40.dp)
|
||||||
.clip(MaterialTheme.shapes.small.copy(topStart = CornerSize(0.dp), bottomStart = CornerSize(0.dp)))
|
.clip(MaterialTheme.shapes.small.copy(topStart = CornerSize(0.dp), bottomStart = CornerSize(0.dp)))
|
||||||
.background(MaterialTheme.colors.confirmationButton)
|
.background(MaterialTheme.colors.primary)
|
||||||
.handMouseClickable { showDropDownMenu = true }
|
.handMouseClickable { showDropDownMenu = true }
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
@ -367,7 +367,7 @@ fun ConfirmationButton(
|
|||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
shape = shape,
|
shape = shape,
|
||||||
colors = ButtonDefaults.buttonColors(
|
colors = ButtonDefaults.buttonColors(
|
||||||
backgroundColor = MaterialTheme.colors.confirmationButton,
|
backgroundColor = MaterialTheme.colors.primary,
|
||||||
contentColor = Color.White
|
contentColor = Color.White
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
|
@ -26,6 +26,7 @@ import app.extensions.dirPath
|
|||||||
import app.extensions.openUrlInBrowser
|
import app.extensions.openUrlInBrowser
|
||||||
import app.theme.primaryTextColor
|
import app.theme.primaryTextColor
|
||||||
import app.theme.secondaryTextColor
|
import app.theme.secondaryTextColor
|
||||||
|
import app.theme.textButtonColors
|
||||||
import app.ui.dialogs.AppInfoDialog
|
import app.ui.dialogs.AppInfoDialog
|
||||||
import app.ui.dialogs.CloneDialog
|
import app.ui.dialogs.CloneDialog
|
||||||
import app.updates.Update
|
import app.updates.Update
|
||||||
@ -225,13 +226,13 @@ fun RecentRepositories(appStateManager: AppStateManager, tabViewModel: TabViewMo
|
|||||||
TextButton(
|
TextButton(
|
||||||
onClick = {
|
onClick = {
|
||||||
tabViewModel.openRepository(repo)
|
tabViewModel.openRepository(repo)
|
||||||
}
|
},
|
||||||
|
colors = textButtonColors(),
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = repoDirName,
|
text = repoDirName,
|
||||||
fontSize = 14.sp,
|
fontSize = 14.sp,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
color = MaterialTheme.colors.primary,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -270,12 +271,13 @@ fun ButtonTile(
|
|||||||
.size(24.dp),
|
.size(24.dp),
|
||||||
painter = painter,
|
painter = painter,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.primary),
|
colorFilter = ColorFilter.tint(MaterialTheme.colors.primaryVariant),
|
||||||
)
|
)
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = title,
|
text = title,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
|
color = MaterialTheme.colors.primaryVariant,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -286,12 +288,13 @@ fun IconTextButton(
|
|||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
title: String,
|
title: String,
|
||||||
painter: Painter,
|
painter: Painter,
|
||||||
iconColor: Color = MaterialTheme.colors.primary,
|
iconColor: Color = MaterialTheme.colors.primaryVariant,
|
||||||
onClick: () -> Unit,
|
onClick: () -> Unit,
|
||||||
) {
|
) {
|
||||||
TextButton(
|
TextButton(
|
||||||
onClick = onClick,
|
onClick = onClick,
|
||||||
modifier = modifier.size(width = 280.dp, height = 40.dp)
|
modifier = modifier.size(width = 280.dp, height = 40.dp),
|
||||||
|
colors = textButtonColors(),
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
|
@ -21,7 +21,7 @@ fun PrimaryButton(
|
|||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
colors = ButtonDefaults.buttonColors(
|
colors = ButtonDefaults.buttonColors(
|
||||||
backgroundColor = MaterialTheme.colors.primaryVariant,
|
backgroundColor = MaterialTheme.colors.primary,
|
||||||
contentColor = textColor
|
contentColor = textColor
|
||||||
),
|
),
|
||||||
) {
|
) {
|
||||||
|
@ -28,8 +28,6 @@ import app.di.AppComponent
|
|||||||
import app.di.DaggerTabComponent
|
import app.di.DaggerTabComponent
|
||||||
import app.extensions.handMouseClickable
|
import app.extensions.handMouseClickable
|
||||||
import app.theme.primaryTextColor
|
import app.theme.primaryTextColor
|
||||||
import app.theme.tabColorActive
|
|
||||||
import app.theme.tabColorInactive
|
|
||||||
import app.viewmodels.TabViewModel
|
import app.viewmodels.TabViewModel
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import kotlin.io.path.Path
|
import kotlin.io.path.Path
|
||||||
@ -44,9 +42,7 @@ fun RepositoriesTabPanel(
|
|||||||
onTabClosed: (Int) -> Unit,
|
onTabClosed: (Int) -> Unit,
|
||||||
newTabContent: (key: Int) -> TabInformation,
|
newTabContent: (key: Int) -> TabInformation,
|
||||||
) {
|
) {
|
||||||
var tabsIdentifier by remember {
|
var tabsIdentifier by remember { mutableStateOf(tabs.count()) }
|
||||||
mutableStateOf(tabs.count())
|
|
||||||
}
|
|
||||||
|
|
||||||
TabPanel(
|
TabPanel(
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
@ -123,7 +119,7 @@ fun TabPanel(
|
|||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Default.Add,
|
imageVector = Icons.Default.Add,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colors.primary
|
tint = MaterialTheme.colors.primaryVariant,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -138,9 +134,9 @@ fun Tab(title: MutableState<String>, selected: Boolean, onClick: () -> Unit, onC
|
|||||||
0.dp
|
0.dp
|
||||||
Box {
|
Box {
|
||||||
val backgroundColor = if (selected)
|
val backgroundColor = if (selected)
|
||||||
MaterialTheme.colors.tabColorActive
|
MaterialTheme.colors.surface
|
||||||
else
|
else
|
||||||
MaterialTheme.colors.tabColorInactive
|
MaterialTheme.colors.background
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
@ -16,7 +16,7 @@ import androidx.compose.ui.Alignment
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import app.theme.scrollbarHover
|
import app.theme.scrollbarHover
|
||||||
import app.theme.scrollbarUnhover
|
import app.theme.scrollbarNormal
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ScrollableLazyColumn(
|
fun ScrollableLazyColumn(
|
||||||
@ -37,7 +37,7 @@ fun ScrollableLazyColumn(
|
|||||||
.fillMaxHeight()
|
.fillMaxHeight()
|
||||||
.padding(end = 4.dp),
|
.padding(end = 4.dp),
|
||||||
style = LocalScrollbarStyle.current.copy(
|
style = LocalScrollbarStyle.current.copy(
|
||||||
unhoverColor = MaterialTheme.colors.scrollbarUnhover,
|
unhoverColor = MaterialTheme.colors.scrollbarNormal,
|
||||||
hoverColor = MaterialTheme.colors.scrollbarHover,
|
hoverColor = MaterialTheme.colors.scrollbarHover,
|
||||||
),
|
),
|
||||||
adapter = rememberScrollbarAdapter(
|
adapter = rememberScrollbarAdapter(
|
||||||
|
@ -47,7 +47,7 @@ fun SideMenuSubentry(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(horizontal = 8.dp)
|
.padding(horizontal = 8.dp)
|
||||||
.size(16.dp),
|
.size(16.dp),
|
||||||
tint = MaterialTheme.colors.primary,
|
tint = MaterialTheme.colors.primaryVariant,
|
||||||
)
|
)
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
|
@ -26,7 +26,7 @@ fun TextLink(
|
|||||||
val textColor = if (isHovered == colorsInverted) {
|
val textColor = if (isHovered == colorsInverted) {
|
||||||
MaterialTheme.colors.primaryTextColor
|
MaterialTheme.colors.primaryTextColor
|
||||||
} else {
|
} else {
|
||||||
MaterialTheme.colors.primary
|
MaterialTheme.colors.primaryVariant
|
||||||
}
|
}
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
|
@ -14,6 +14,7 @@ import app.AppConstants
|
|||||||
import app.AppConstants.openSourceProjects
|
import app.AppConstants.openSourceProjects
|
||||||
import app.Project
|
import app.Project
|
||||||
import app.theme.primaryTextColor
|
import app.theme.primaryTextColor
|
||||||
|
import app.theme.textButtonColors
|
||||||
import app.ui.components.ScrollableLazyColumn
|
import app.ui.components.ScrollableLazyColumn
|
||||||
import app.ui.components.TextLink
|
import app.ui.components.TextLink
|
||||||
|
|
||||||
@ -64,7 +65,8 @@ fun AppInfoDialog(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(top = 16.dp, end = 8.dp)
|
.padding(top = 16.dp, end = 8.dp)
|
||||||
.align(Alignment.End),
|
.align(Alignment.End),
|
||||||
onClick = onClose
|
onClick = onClose,
|
||||||
|
colors = textButtonColors(),
|
||||||
) {
|
) {
|
||||||
Text("Close")
|
Text("Close")
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,9 @@ import androidx.compose.ui.text.TextStyle
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import app.git.CloneStatus
|
import app.git.CloneStatus
|
||||||
|
import app.theme.outlinedTextFieldColors
|
||||||
import app.theme.primaryTextColor
|
import app.theme.primaryTextColor
|
||||||
|
import app.theme.textButtonColors
|
||||||
import app.ui.components.PrimaryButton
|
import app.ui.components.PrimaryButton
|
||||||
import app.viewmodels.CloneViewModel
|
import app.viewmodels.CloneViewModel
|
||||||
import openDirectoryDialog
|
import openDirectoryDialog
|
||||||
@ -106,6 +108,7 @@ private fun CloneInput(
|
|||||||
textStyle = TextStyle(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
textStyle = TextStyle(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
value = url,
|
value = url,
|
||||||
|
colors = outlinedTextFieldColors(),
|
||||||
onValueChange = {
|
onValueChange = {
|
||||||
cloneViewModel.resetStateIfError()
|
cloneViewModel.resetStateIfError()
|
||||||
url = it
|
url = it
|
||||||
@ -131,6 +134,7 @@ private fun CloneInput(
|
|||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
label = { Text("Directory") },
|
label = { Text("Directory") },
|
||||||
value = directory,
|
value = directory,
|
||||||
|
colors = outlinedTextFieldColors(),
|
||||||
onValueChange = {
|
onValueChange = {
|
||||||
cloneViewModel.resetStateIfError()
|
cloneViewModel.resetStateIfError()
|
||||||
directory = it
|
directory = it
|
||||||
@ -190,6 +194,7 @@ private fun CloneInput(
|
|||||||
previous = cloneButtonFocusRequester
|
previous = cloneButtonFocusRequester
|
||||||
next = urlFocusRequester
|
next = urlFocusRequester
|
||||||
},
|
},
|
||||||
|
colors = textButtonColors(),
|
||||||
onClick = {
|
onClick = {
|
||||||
onClose()
|
onClose()
|
||||||
}
|
}
|
||||||
@ -248,6 +253,7 @@ private fun Cloning(cloneViewModel: CloneViewModel, cloneStatusValue: CloneStatu
|
|||||||
end = 8.dp
|
end = 8.dp
|
||||||
)
|
)
|
||||||
.align(Alignment.End),
|
.align(Alignment.End),
|
||||||
|
colors = textButtonColors(),
|
||||||
onClick = {
|
onClick = {
|
||||||
cloneViewModel.cancelClone()
|
cloneViewModel.cancelClone()
|
||||||
}
|
}
|
||||||
|
@ -19,9 +19,7 @@ import androidx.compose.ui.res.painterResource
|
|||||||
import androidx.compose.ui.text.TextStyle
|
import androidx.compose.ui.text.TextStyle
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import app.extensions.handMouseClickable
|
import app.extensions.handMouseClickable
|
||||||
import app.theme.borderColor
|
import app.theme.*
|
||||||
import app.theme.primaryTextColor
|
|
||||||
import app.theme.secondaryTextColor
|
|
||||||
import app.ui.components.PrimaryButton
|
import app.ui.components.PrimaryButton
|
||||||
import app.viewmodels.RemotesViewModel
|
import app.viewmodels.RemotesViewModel
|
||||||
import org.eclipse.jgit.transport.RemoteConfig
|
import org.eclipse.jgit.transport.RemoteConfig
|
||||||
@ -230,6 +228,7 @@ fun EditRemotesDialog(
|
|||||||
},
|
},
|
||||||
textStyle = TextStyle.Default.copy(color = MaterialTheme.colors.primaryTextColor),
|
textStyle = TextStyle.Default.copy(color = MaterialTheme.colors.primaryTextColor),
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
|
colors = outlinedTextFieldColors(),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(vertical = 8.dp)
|
.padding(vertical = 8.dp)
|
||||||
@ -251,6 +250,7 @@ fun EditRemotesDialog(
|
|||||||
},
|
},
|
||||||
textStyle = TextStyle.Default.copy(color = MaterialTheme.colors.primaryTextColor),
|
textStyle = TextStyle.Default.copy(color = MaterialTheme.colors.primaryTextColor),
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
|
colors = outlinedTextFieldColors(),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(vertical = 8.dp)
|
.padding(vertical = 8.dp)
|
||||||
@ -271,6 +271,7 @@ fun EditRemotesDialog(
|
|||||||
},
|
},
|
||||||
textStyle = TextStyle.Default.copy(color = MaterialTheme.colors.primaryTextColor),
|
textStyle = TextStyle.Default.copy(color = MaterialTheme.colors.primaryTextColor),
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
|
colors = outlinedTextFieldColors(),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(vertical = 8.dp)
|
.padding(vertical = 8.dp)
|
||||||
@ -289,6 +290,7 @@ fun EditRemotesDialog(
|
|||||||
TextButton(
|
TextButton(
|
||||||
modifier = Modifier.padding(end = 8.dp),
|
modifier = Modifier.padding(end = 8.dp),
|
||||||
enabled = remoteChanged,
|
enabled = remoteChanged,
|
||||||
|
colors = textButtonColors(),
|
||||||
onClick = {
|
onClick = {
|
||||||
remotesEditorData = remotesEditorData.copy(
|
remotesEditorData = remotesEditorData.copy(
|
||||||
selectedRemote = selectedRemote.copy(
|
selectedRemote = selectedRemote.copy(
|
||||||
|
@ -13,7 +13,7 @@ import androidx.compose.ui.draw.clip
|
|||||||
import androidx.compose.ui.unit.*
|
import androidx.compose.ui.unit.*
|
||||||
import androidx.compose.ui.window.Popup
|
import androidx.compose.ui.window.Popup
|
||||||
import androidx.compose.ui.window.PopupPositionProvider
|
import androidx.compose.ui.window.PopupPositionProvider
|
||||||
import app.theme.dialogBackgroundColor
|
import app.theme.dialogOverlay
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun MaterialDialog(
|
fun MaterialDialog(
|
||||||
@ -36,7 +36,7 @@ fun MaterialDialog(
|
|||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.background(dialogBackgroundColor),
|
.background(MaterialTheme.colors.dialogOverlay),
|
||||||
contentAlignment = alignment,
|
contentAlignment = alignment,
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
|
@ -15,6 +15,7 @@ import androidx.compose.ui.input.pointer.isPrimaryPressed
|
|||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import app.theme.primaryTextColor
|
import app.theme.primaryTextColor
|
||||||
|
import app.theme.textButtonColors
|
||||||
import app.ui.components.PrimaryButton
|
import app.ui.components.PrimaryButton
|
||||||
|
|
||||||
@OptIn(ExperimentalFoundationApi::class)
|
@OptIn(ExperimentalFoundationApi::class)
|
||||||
@ -89,6 +90,7 @@ fun MergeDialog(
|
|||||||
) {
|
) {
|
||||||
TextButton(
|
TextButton(
|
||||||
modifier = Modifier.padding(end = 8.dp),
|
modifier = Modifier.padding(end = 8.dp),
|
||||||
|
colors = textButtonColors(),
|
||||||
onClick = {
|
onClick = {
|
||||||
onReject()
|
onReject()
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,9 @@ import androidx.compose.ui.input.key.onPreviewKeyEvent
|
|||||||
import androidx.compose.ui.text.TextStyle
|
import androidx.compose.ui.text.TextStyle
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
|
import app.theme.outlinedTextFieldColors
|
||||||
import app.theme.primaryTextColor
|
import app.theme.primaryTextColor
|
||||||
|
import app.theme.textButtonColors
|
||||||
import app.ui.components.PrimaryButton
|
import app.ui.components.PrimaryButton
|
||||||
|
|
||||||
@OptIn(ExperimentalComposeUiApi::class)
|
@OptIn(ExperimentalComposeUiApi::class)
|
||||||
@ -53,6 +55,7 @@ fun NewBranchDialog(
|
|||||||
singleLine = true,
|
singleLine = true,
|
||||||
label = { Text("New branch name", fontSize = 14.sp) },
|
label = { Text("New branch name", fontSize = 14.sp) },
|
||||||
textStyle = TextStyle(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
textStyle = TextStyle(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
||||||
|
colors = outlinedTextFieldColors(),
|
||||||
onValueChange = {
|
onValueChange = {
|
||||||
branchField = it
|
branchField = it
|
||||||
},
|
},
|
||||||
@ -64,6 +67,7 @@ fun NewBranchDialog(
|
|||||||
) {
|
) {
|
||||||
TextButton(
|
TextButton(
|
||||||
modifier = Modifier.padding(end = 8.dp),
|
modifier = Modifier.padding(end = 8.dp),
|
||||||
|
colors = textButtonColors(),
|
||||||
onClick = {
|
onClick = {
|
||||||
onReject()
|
onReject()
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,9 @@ import androidx.compose.ui.input.key.onPreviewKeyEvent
|
|||||||
import androidx.compose.ui.text.TextStyle
|
import androidx.compose.ui.text.TextStyle
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
|
import app.theme.outlinedTextFieldColors
|
||||||
import app.theme.primaryTextColor
|
import app.theme.primaryTextColor
|
||||||
|
import app.theme.textButtonColors
|
||||||
import app.ui.components.PrimaryButton
|
import app.ui.components.PrimaryButton
|
||||||
|
|
||||||
@OptIn(ExperimentalComposeUiApi::class)
|
@OptIn(ExperimentalComposeUiApi::class)
|
||||||
@ -53,6 +55,7 @@ fun NewTagDialog(
|
|||||||
singleLine = true,
|
singleLine = true,
|
||||||
label = { Text("New tag name", fontSize = 14.sp) },
|
label = { Text("New tag name", fontSize = 14.sp) },
|
||||||
textStyle = TextStyle(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
textStyle = TextStyle(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
||||||
|
colors = outlinedTextFieldColors(),
|
||||||
onValueChange = {
|
onValueChange = {
|
||||||
tagField = it
|
tagField = it
|
||||||
},
|
},
|
||||||
@ -64,6 +67,7 @@ fun NewTagDialog(
|
|||||||
) {
|
) {
|
||||||
TextButton(
|
TextButton(
|
||||||
modifier = Modifier.padding(end = 8.dp),
|
modifier = Modifier.padding(end = 8.dp),
|
||||||
|
colors = textButtonColors(),
|
||||||
onClick = {
|
onClick = {
|
||||||
onReject()
|
onReject()
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ import androidx.compose.ui.text.TextStyle
|
|||||||
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
|
import app.theme.outlinedTextFieldColors
|
||||||
import app.theme.primaryTextColor
|
import app.theme.primaryTextColor
|
||||||
import app.ui.components.PrimaryButton
|
import app.ui.components.PrimaryButton
|
||||||
|
|
||||||
@ -61,6 +62,7 @@ fun PasswordDialog(
|
|||||||
singleLine = true,
|
singleLine = true,
|
||||||
label = { Text("Password", fontSize = 14.sp) },
|
label = { Text("Password", fontSize = 14.sp) },
|
||||||
textStyle = TextStyle(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
textStyle = TextStyle(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
||||||
|
colors = outlinedTextFieldColors(),
|
||||||
onValueChange = {
|
onValueChange = {
|
||||||
passwordField = it
|
passwordField = it
|
||||||
},
|
},
|
||||||
|
@ -15,6 +15,7 @@ import androidx.compose.ui.Modifier
|
|||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import app.theme.primaryTextColor
|
import app.theme.primaryTextColor
|
||||||
|
import app.theme.textButtonColors
|
||||||
import app.ui.components.PrimaryButton
|
import app.ui.components.PrimaryButton
|
||||||
|
|
||||||
@OptIn(ExperimentalFoundationApi::class)
|
@OptIn(ExperimentalFoundationApi::class)
|
||||||
@ -67,6 +68,7 @@ fun RebaseDialog(
|
|||||||
) {
|
) {
|
||||||
TextButton(
|
TextButton(
|
||||||
modifier = Modifier.padding(end = 8.dp),
|
modifier = Modifier.padding(end = 8.dp),
|
||||||
|
colors = textButtonColors(),
|
||||||
onClick = {
|
onClick = {
|
||||||
onReject()
|
onReject()
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ import androidx.compose.ui.input.pointer.pointerHoverIcon
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import app.git.ResetType
|
import app.git.ResetType
|
||||||
import app.theme.primaryTextColor
|
import app.theme.primaryTextColor
|
||||||
|
import app.theme.textButtonColors
|
||||||
import app.ui.components.PrimaryButton
|
import app.ui.components.PrimaryButton
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@ -60,6 +61,7 @@ fun ResetBranchDialog(
|
|||||||
) {
|
) {
|
||||||
TextButton(
|
TextButton(
|
||||||
modifier = Modifier.padding(end = 8.dp),
|
modifier = Modifier.padding(end = 8.dp),
|
||||||
|
colors = textButtonColors(),
|
||||||
onClick = {
|
onClick = {
|
||||||
onReject()
|
onReject()
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,9 @@ import androidx.compose.ui.unit.dp
|
|||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import app.AppPreferences
|
import app.AppPreferences
|
||||||
import app.DropDownOption
|
import app.DropDownOption
|
||||||
|
import app.theme.outlinedTextFieldColors
|
||||||
import app.theme.primaryTextColor
|
import app.theme.primaryTextColor
|
||||||
|
import app.theme.textButtonColors
|
||||||
import app.theme.themesList
|
import app.theme.themesList
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@ -68,6 +70,7 @@ fun SettingsDialog(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(end = 8.dp)
|
.padding(end = 8.dp)
|
||||||
.align(Alignment.End),
|
.align(Alignment.End),
|
||||||
|
colors = textButtonColors(),
|
||||||
onClick = {
|
onClick = {
|
||||||
savePendingSettings(
|
savePendingSettings(
|
||||||
appPreferences = appPreferences,
|
appPreferences = appPreferences,
|
||||||
@ -244,10 +247,7 @@ fun SettingIntInput(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colors = TextFieldDefaults.textFieldColors(
|
colors = outlinedTextFieldColors(),
|
||||||
backgroundColor = MaterialTheme.colors.background,
|
|
||||||
textColor = MaterialTheme.colors.primaryTextColor,
|
|
||||||
),
|
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
textStyle = LocalTextStyle.current.copy(textAlign = TextAlign.End),
|
textStyle = LocalTextStyle.current.copy(textAlign = TextAlign.End),
|
||||||
)
|
)
|
||||||
|
@ -16,7 +16,9 @@ import androidx.compose.ui.text.TextStyle
|
|||||||
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
|
import app.theme.outlinedTextFieldColors
|
||||||
import app.theme.primaryTextColor
|
import app.theme.primaryTextColor
|
||||||
|
import app.theme.textButtonColors
|
||||||
import app.ui.components.PrimaryButton
|
import app.ui.components.PrimaryButton
|
||||||
|
|
||||||
@OptIn(ExperimentalComposeUiApi::class)
|
@OptIn(ExperimentalComposeUiApi::class)
|
||||||
@ -64,6 +66,7 @@ fun UserPasswordDialog(
|
|||||||
},
|
},
|
||||||
value = userField,
|
value = userField,
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
|
colors = outlinedTextFieldColors(),
|
||||||
label = { Text("User", fontSize = 14.sp) },
|
label = { Text("User", fontSize = 14.sp) },
|
||||||
textStyle = TextStyle(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
textStyle = TextStyle(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
||||||
onValueChange = {
|
onValueChange = {
|
||||||
@ -89,6 +92,7 @@ fun UserPasswordDialog(
|
|||||||
singleLine = true,
|
singleLine = true,
|
||||||
label = { Text("Password", fontSize = 14.sp) },
|
label = { Text("Password", fontSize = 14.sp) },
|
||||||
textStyle = TextStyle(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
textStyle = TextStyle(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
||||||
|
colors = outlinedTextFieldColors(),
|
||||||
onValueChange = {
|
onValueChange = {
|
||||||
passwordField = it
|
passwordField = it
|
||||||
},
|
},
|
||||||
@ -102,6 +106,7 @@ fun UserPasswordDialog(
|
|||||||
) {
|
) {
|
||||||
TextButton(
|
TextButton(
|
||||||
modifier = Modifier.padding(end = 8.dp),
|
modifier = Modifier.padding(end = 8.dp),
|
||||||
|
colors = textButtonColors(),
|
||||||
onClick = {
|
onClick = {
|
||||||
onReject()
|
onReject()
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,6 @@ import androidx.compose.ui.input.pointer.pointerHoverIcon
|
|||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.text.TextStyle
|
import androidx.compose.ui.text.TextStyle
|
||||||
import androidx.compose.ui.text.font.FontStyle
|
import androidx.compose.ui.text.font.FontStyle
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.unit.Dp
|
import androidx.compose.ui.unit.Dp
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
@ -193,7 +192,7 @@ fun Log(
|
|||||||
HorizontalScrollbar(
|
HorizontalScrollbar(
|
||||||
modifier = Modifier.align(Alignment.BottomStart).width(graphWidth)
|
modifier = Modifier.align(Alignment.BottomStart).width(graphWidth)
|
||||||
.padding(start = 4.dp, bottom = 4.dp), style = LocalScrollbarStyle.current.copy(
|
.padding(start = 4.dp, bottom = 4.dp), style = LocalScrollbarStyle.current.copy(
|
||||||
unhoverColor = MaterialTheme.colors.scrollbarUnhover,
|
unhoverColor = MaterialTheme.colors.scrollbarNormal,
|
||||||
hoverColor = MaterialTheme.colors.scrollbarHover,
|
hoverColor = MaterialTheme.colors.scrollbarHover,
|
||||||
), adapter = rememberScrollbarAdapter(horizontalScrollState)
|
), adapter = rememberScrollbarAdapter(horizontalScrollState)
|
||||||
)
|
)
|
||||||
@ -264,7 +263,7 @@ fun SearchFilter(
|
|||||||
label = {
|
label = {
|
||||||
Text("Search by message, author name or commit ID")
|
Text("Search by message, author name or commit ID")
|
||||||
},
|
},
|
||||||
colors = TextFieldDefaults.textFieldColors(backgroundColor = MaterialTheme.colors.background),
|
colors = textFieldColors(),
|
||||||
textStyle = TextStyle.Default.copy(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
textStyle = TextStyle.Default.copy(fontSize = 14.sp, color = MaterialTheme.colors.primaryTextColor),
|
||||||
trailingIcon = {
|
trailingIcon = {
|
||||||
Row(
|
Row(
|
||||||
@ -835,7 +834,10 @@ fun DividerLog(modifier: Modifier, graphWidth: Dp) {
|
|||||||
.pointerHoverIcon(PointerIcon(Cursor(Cursor.E_RESIZE_CURSOR)))
|
.pointerHoverIcon(PointerIcon(Cursor(Cursor.E_RESIZE_CURSOR)))
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier.fillMaxHeight().width(1.dp).background(color = MaterialTheme.colors.primary)
|
modifier = Modifier
|
||||||
|
.fillMaxHeight()
|
||||||
|
.width(1.dp)
|
||||||
|
.background(color = MaterialTheme.colors.primaryVariant)
|
||||||
.align(Alignment.Center)
|
.align(Alignment.Center)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -1004,7 +1006,7 @@ fun BranchChip(
|
|||||||
painter = painterResource("location.svg"),
|
painter = painterResource("location.svg"),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
modifier = Modifier.padding(end = 6.dp),
|
modifier = Modifier.padding(end = 6.dp),
|
||||||
tint = MaterialTheme.colors.primary,
|
tint = MaterialTheme.colors.primaryVariant,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1077,7 +1079,7 @@ fun RefChip(
|
|||||||
modifier = Modifier.padding(6.dp).size(14.dp),
|
modifier = Modifier.padding(6.dp).size(14.dp),
|
||||||
painter = painterResource(icon),
|
painter = painterResource(icon),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colors.inversePrimaryTextColor,
|
tint = MaterialTheme.colors.background,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
|
Loading…
Reference in New Issue
Block a user