Replaced primaryTextColor with onBackground & added new ssh pwd dialog
This commit is contained in:
parent
08536b2caa
commit
76b3526aed
@ -26,7 +26,6 @@ import com.jetpackduba.gitnuro.logging.printLog
|
||||
import com.jetpackduba.gitnuro.preferences.AppSettings
|
||||
import com.jetpackduba.gitnuro.theme.AppTheme
|
||||
import com.jetpackduba.gitnuro.theme.Theme
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
import com.jetpackduba.gitnuro.theme.secondaryTextColor
|
||||
import com.jetpackduba.gitnuro.ui.AppTab
|
||||
import com.jetpackduba.gitnuro.ui.components.RepositoriesTabPanel
|
||||
@ -251,7 +250,7 @@ fun LoadingRepository(repoPath: String) {
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Text("Opening repository", fontSize = 36.sp, color = MaterialTheme.colors.primaryTextColor)
|
||||
Text("Opening repository", fontSize = 36.sp, color = MaterialTheme.colors.onBackground)
|
||||
Text(repoPath, fontSize = 24.sp, color = MaterialTheme.colors.secondaryTextColor)
|
||||
}
|
||||
}
|
||||
|
@ -39,9 +39,9 @@ val darkBlueTheme = ColorsScheme(
|
||||
secondaryText = Color(0xFFCCCBCB),
|
||||
error = Color(0xFFc93838),
|
||||
onError = Color(0xFFFFFFFF),
|
||||
background = Color(0xFF16181F),
|
||||
background = Color(0xFF0E1621),
|
||||
backgroundSelected = Color(0xFF2f3640),
|
||||
surface = Color(0xFF202538),
|
||||
surface = Color(0xFF182533),
|
||||
secondarySurface = Color(0xFF122C46),
|
||||
headerBackground = Color(0xFF0a335c),
|
||||
borderColor = Color(0xFF989898),
|
||||
|
@ -12,7 +12,7 @@ fun textFieldColors(
|
||||
focusedIndicatorColor: Color = MaterialTheme.colors.primaryVariant,
|
||||
focusedLabelColor: Color = MaterialTheme.colors.primaryVariant,
|
||||
backgroundColor: Color = MaterialTheme.colors.background,
|
||||
textColor: Color = MaterialTheme.colors.primaryTextColor,
|
||||
textColor: Color = MaterialTheme.colors.onBackground,
|
||||
disabledTextColor: Color = MaterialTheme.colors.secondaryTextColor,
|
||||
) = TextFieldDefaults.textFieldColors(
|
||||
cursorColor = cursorColor,
|
||||
@ -29,7 +29,7 @@ fun outlinedTextFieldColors() = TextFieldDefaults.outlinedTextFieldColors(
|
||||
focusedBorderColor = MaterialTheme.colors.primaryVariant,
|
||||
focusedLabelColor = MaterialTheme.colors.primaryVariant,
|
||||
backgroundColor = MaterialTheme.colors.background,
|
||||
textColor = MaterialTheme.colors.primaryTextColor,
|
||||
textColor = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
|
||||
@Composable
|
||||
|
@ -37,10 +37,6 @@ fun AppTheme(
|
||||
val Colors.backgroundSelected: Color
|
||||
get() = appTheme.backgroundSelected
|
||||
|
||||
@get:Composable
|
||||
val Colors.primaryTextColor: Color
|
||||
get() = appTheme.primaryText
|
||||
|
||||
@get:Composable
|
||||
val Colors.secondaryTextColor: Color
|
||||
get() = appTheme.secondaryText
|
||||
|
@ -29,38 +29,38 @@ fun typography() = Typography(
|
||||
defaultFontFamily = openSansFontFamily,
|
||||
h1 = TextStyle(
|
||||
fontSize = 32.sp,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
letterSpacing = LETTER_SPACING.sp,
|
||||
),
|
||||
h2 = TextStyle(
|
||||
fontSize = 24.sp,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
letterSpacing = LETTER_SPACING.sp,
|
||||
),
|
||||
h3 = TextStyle(
|
||||
fontSize = 20.sp,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
letterSpacing = LETTER_SPACING.sp,
|
||||
),
|
||||
h4 = TextStyle(
|
||||
fontSize = 17.sp,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
letterSpacing = LETTER_SPACING.sp,
|
||||
),
|
||||
body1 = TextStyle(
|
||||
fontSize = 15.sp,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
letterSpacing = LETTER_SPACING.sp,
|
||||
),
|
||||
body2 = TextStyle(
|
||||
fontSize = 13.sp,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
fontWeight = FontWeight.Normal,
|
||||
letterSpacing = LETTER_SPACING.sp,
|
||||
),
|
||||
caption = TextStyle(
|
||||
fontSize = 11.sp,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
letterSpacing = LETTER_SPACING.sp,
|
||||
)
|
||||
)
|
@ -33,7 +33,6 @@ import com.jetpackduba.gitnuro.extensions.toStringWithSpaces
|
||||
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
||||
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
||||
import com.jetpackduba.gitnuro.theme.headerBackground
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
import com.jetpackduba.gitnuro.theme.secondarySurface
|
||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||
import com.jetpackduba.gitnuro.ui.components.ScrollableLazyColumn
|
||||
@ -119,7 +118,7 @@ fun Blame(
|
||||
|
||||
Text(
|
||||
text = line + blameResult.resultContents.lineDelimiter,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
modifier = Modifier.padding(vertical = 8.dp, horizontal = 16.dp),
|
||||
fontFamily = FontFamily.Monospace,
|
||||
maxLines = 1,
|
||||
@ -142,7 +141,7 @@ private fun LineNumber(line: Int, highestLineLength: Int) {
|
||||
) {
|
||||
Text(
|
||||
text = line.toStringWithSpaces(highestLineLength),
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
fontFamily = FontFamily.Monospace,
|
||||
)
|
||||
}
|
||||
@ -193,7 +192,7 @@ fun MinimizedBlame(
|
||||
Image(
|
||||
painter = painterResource("close.svg"),
|
||||
contentDescription = "Close blame",
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.primaryTextColor),
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.onBackground),
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -228,7 +227,7 @@ private fun Header(
|
||||
Image(
|
||||
painter = painterResource("close.svg"),
|
||||
contentDescription = "Close blame",
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.primaryTextColor),
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.onBackground),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ fun CommitLogChanges(
|
||||
maxLines = 1,
|
||||
softWrap = false,
|
||||
style = MaterialTheme.typography.body2,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -19,8 +19,6 @@ import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.input.key.onKeyEvent
|
||||
import androidx.compose.ui.input.pointer.PointerIconDefaults
|
||||
import androidx.compose.ui.input.pointer.pointerHoverIcon
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.jetpackduba.gitnuro.extensions.handMouseClickable
|
||||
@ -30,7 +28,6 @@ import com.jetpackduba.gitnuro.git.diff.DiffResult
|
||||
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
||||
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
||||
import com.jetpackduba.gitnuro.theme.headerBackground
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
import com.jetpackduba.gitnuro.theme.secondaryTextColor
|
||||
import com.jetpackduba.gitnuro.ui.components.AvatarImage
|
||||
import com.jetpackduba.gitnuro.ui.components.ScrollableLazyColumn
|
||||
@ -108,7 +105,7 @@ private fun Header(
|
||||
Image(
|
||||
painter = painterResource("close.svg"),
|
||||
contentDescription = "Close history",
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.primaryTextColor),
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.onBackground),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
import com.jetpackduba.gitnuro.theme.textButtonColors
|
||||
import com.jetpackduba.gitnuro.ui.components.AdjustableOutlinedTextField
|
||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||
@ -62,7 +61,7 @@ fun RebaseStateLoaded(
|
||||
) {
|
||||
Text(
|
||||
text = "Rebase interactive",
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
modifier = Modifier.padding(start = 16.dp, top = 16.dp),
|
||||
fontSize = 20.sp,
|
||||
)
|
||||
|
@ -18,7 +18,7 @@ import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.jetpackduba.gitnuro.extensions.handOnHover
|
||||
import com.jetpackduba.gitnuro.extensions.simpleName
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
|
||||
import com.jetpackduba.gitnuro.ui.components.SideMenuPanel
|
||||
import com.jetpackduba.gitnuro.ui.components.SideMenuSubentry
|
||||
import com.jetpackduba.gitnuro.ui.components.VerticalExpandable
|
||||
@ -69,7 +69,7 @@ fun Remotes(
|
||||
contentDescription = null,
|
||||
modifier = Modifier
|
||||
.fillMaxSize(),
|
||||
tint = MaterialTheme.colors.primaryTextColor,
|
||||
tint = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
},
|
||||
|
@ -35,7 +35,6 @@ import com.jetpackduba.gitnuro.extensions.handOnHover
|
||||
import com.jetpackduba.gitnuro.git.DiffEntryType
|
||||
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
||||
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
import com.jetpackduba.gitnuro.theme.secondarySurface
|
||||
import com.jetpackduba.gitnuro.ui.components.ScrollableColumn
|
||||
import com.jetpackduba.gitnuro.ui.dialogs.AuthorDialog
|
||||
@ -221,6 +220,7 @@ private fun BottomInfoBar(tabViewModel: TabViewModel) {
|
||||
Text(
|
||||
text = "${userInfo.name ?: "Name not set"} <${userInfo.email ?: "Email not set"}>",
|
||||
style = MaterialTheme.typography.body2,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -285,7 +285,7 @@ fun SideBarButton(
|
||||
painter = painterResource(painterName),
|
||||
contentDescription = null,
|
||||
modifier = Modifier,
|
||||
tint = MaterialTheme.colors.primaryTextColor,
|
||||
tint = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -618,7 +618,7 @@ private fun FileEntry(
|
||||
maxLines = 1,
|
||||
softWrap = false,
|
||||
style = MaterialTheme.typography.body2,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import androidx.compose.ui.graphics.Shape
|
||||
import androidx.compose.ui.graphics.SolidColor
|
||||
import androidx.compose.ui.graphics.takeOrElse
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.input.VisualTransformation
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
||||
|
||||
@ -36,10 +37,14 @@ fun AdjustableOutlinedTextField(
|
||||
colors: TextFieldColors = outlinedTextFieldColors(),
|
||||
maxLines: Int = Int.MAX_VALUE,
|
||||
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
|
||||
textStyle: TextStyle = LocalTextStyle.current.copy(fontSize = MaterialTheme.typography.body1.fontSize),
|
||||
textStyle: TextStyle = LocalTextStyle.current.copy(
|
||||
fontSize = MaterialTheme.typography.body1.fontSize,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
),
|
||||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
||||
shape: Shape = RoundedCornerShape(4.dp),
|
||||
backgroundColor: Color = MaterialTheme.colors.background
|
||||
backgroundColor: Color = MaterialTheme.colors.background,
|
||||
visualTransformation: VisualTransformation = VisualTransformation.None,
|
||||
) {
|
||||
val textColor = textStyle.color.takeOrElse {
|
||||
colors.textColor(enabled).value
|
||||
@ -61,6 +66,7 @@ fun AdjustableOutlinedTextField(
|
||||
keyboardOptions = keyboardOptions,
|
||||
cursorBrush = SolidColor(cursorColor),
|
||||
singleLine = singleLine,
|
||||
visualTransformation = visualTransformation,
|
||||
decorationBox = { innerTextField ->
|
||||
Box(
|
||||
modifier = Modifier
|
||||
|
@ -7,7 +7,7 @@ import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
|
||||
|
||||
@Composable
|
||||
fun PrimaryButton(
|
||||
@ -15,7 +15,7 @@ fun PrimaryButton(
|
||||
text: String,
|
||||
enabled: Boolean = true,
|
||||
textColor: Color = MaterialTheme.colors.onPrimary,
|
||||
disabledTextColor: Color = MaterialTheme.colors.primaryTextColor,
|
||||
disabledTextColor: Color = MaterialTheme.colors.onBackground,
|
||||
onClick: () -> Unit,
|
||||
) {
|
||||
Button(
|
||||
|
@ -30,7 +30,7 @@ import com.jetpackduba.gitnuro.di.AppComponent
|
||||
import com.jetpackduba.gitnuro.di.DaggerTabComponent
|
||||
import com.jetpackduba.gitnuro.extensions.handMouseClickable
|
||||
import com.jetpackduba.gitnuro.extensions.handOnHover
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
|
||||
import com.jetpackduba.gitnuro.viewmodels.TabViewModel
|
||||
import javax.inject.Inject
|
||||
import kotlin.io.path.Path
|
||||
@ -164,6 +164,7 @@ fun Tab(title: MutableState<String>, isSelected: Boolean, onClick: () -> Unit, o
|
||||
.weight(1f),
|
||||
overflow = TextOverflow.Visible,
|
||||
style = MaterialTheme.typography.body2,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
maxLines = 1,
|
||||
)
|
||||
|
||||
@ -177,7 +178,7 @@ fun Tab(title: MutableState<String>, isSelected: Boolean, onClick: () -> Unit, o
|
||||
Icon(
|
||||
Icons.Default.Close,
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colors.primaryTextColor
|
||||
tint = MaterialTheme.colors.onBackground
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
|
||||
import com.jetpackduba.gitnuro.theme.secondaryTextColor
|
||||
|
||||
@Composable
|
||||
@ -42,7 +42,7 @@ fun SideMenuEntry(
|
||||
Icon(
|
||||
painter = painterResource(if (isExpanded) "expand_more.svg" else "chevron_right.svg"),
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colors.primaryTextColor,
|
||||
tint = MaterialTheme.colors.onBackground,
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 8.dp)
|
||||
.size(16.dp),
|
||||
@ -52,7 +52,7 @@ fun SideMenuEntry(
|
||||
Icon(
|
||||
painter = icon,
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colors.primaryTextColor,
|
||||
tint = MaterialTheme.colors.onBackground,
|
||||
modifier = Modifier
|
||||
.size(16.dp),
|
||||
)
|
||||
@ -66,7 +66,7 @@ fun SideMenuEntry(
|
||||
maxLines = 1,
|
||||
style = MaterialTheme.typography.body2,
|
||||
fontWeight = FontWeight.Medium,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
)
|
||||
|
||||
|
@ -17,7 +17,7 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
|
||||
|
||||
const val ENTRY_HEIGHT = 36
|
||||
|
||||
@ -59,7 +59,7 @@ fun SideMenuSubentry(
|
||||
modifier = Modifier.weight(1f, fill = true),
|
||||
maxLines = 1,
|
||||
style = MaterialTheme.typography.body2,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
softWrap = false,
|
||||
)
|
||||
|
||||
|
@ -11,7 +11,7 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Modifier
|
||||
import com.jetpackduba.gitnuro.extensions.handMouseClickable
|
||||
import com.jetpackduba.gitnuro.extensions.openUrlInBrowser
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
|
||||
|
||||
@Composable
|
||||
fun TextLink(
|
||||
@ -24,7 +24,7 @@ fun TextLink(
|
||||
val isHovered by hoverInteraction.collectIsHoveredAsState()
|
||||
|
||||
val textColor = if (isHovered == colorsInverted) {
|
||||
MaterialTheme.colors.primaryTextColor
|
||||
MaterialTheme.colors.onBackground
|
||||
} else {
|
||||
MaterialTheme.colors.primaryVariant
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import androidx.compose.ui.window.Popup
|
||||
import androidx.compose.ui.window.PopupPositionProvider
|
||||
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
||||
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
|
||||
import com.jetpackduba.gitnuro.theme.secondaryTextColor
|
||||
import java.awt.event.MouseEvent
|
||||
import kotlin.math.abs
|
||||
@ -126,7 +126,7 @@ fun showPopup(x: Int, y: Int, contextMenuElements: List<ContextMenuElement>, onD
|
||||
.background(MaterialTheme.colors.background)
|
||||
.run {
|
||||
return@run if (!MaterialTheme.colors.isLight) {
|
||||
this.border(1.dp, MaterialTheme.colors.primaryTextColor.copy(alpha = 0.2f))
|
||||
this.border(1.dp, MaterialTheme.colors.onBackground.copy(alpha = 0.2f))
|
||||
} else
|
||||
this
|
||||
}
|
||||
@ -160,7 +160,7 @@ fun Separator() {
|
||||
.padding(horizontal = 16.dp)
|
||||
.fillMaxWidth()
|
||||
.height(1.dp)
|
||||
.background(MaterialTheme.colors.primaryTextColor.copy(alpha = 0.4f))
|
||||
.background(MaterialTheme.colors.onBackground.copy(alpha = 0.4f))
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
|
||||
import com.jetpackduba.gitnuro.theme.textButtonColors
|
||||
import com.jetpackduba.gitnuro.ui.components.AdjustableOutlinedTextField
|
||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||
@ -43,7 +43,7 @@ fun AuthorDialog(
|
||||
|
||||
Text(
|
||||
text = "Global settings",
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
fontSize = 16.sp,
|
||||
modifier = Modifier.padding(vertical = 8.dp),
|
||||
)
|
||||
@ -61,7 +61,7 @@ fun AuthorDialog(
|
||||
|
||||
Text(
|
||||
text = "Repository settings",
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
fontSize = 16.sp,
|
||||
modifier = Modifier.padding(top = 16.dp, bottom = 8.dp),
|
||||
)
|
||||
@ -88,7 +88,7 @@ fun AuthorDialog(
|
||||
Icon(
|
||||
painterResource("warning.svg"),
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colors.primaryTextColor,
|
||||
tint = MaterialTheme.colors.onBackground,
|
||||
modifier = Modifier.size(16.dp)
|
||||
)
|
||||
Text(
|
||||
|
@ -19,7 +19,7 @@ import androidx.compose.ui.graphics.Shape
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.jetpackduba.gitnuro.git.CloneStatus
|
||||
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
|
||||
import com.jetpackduba.gitnuro.theme.textButtonColors
|
||||
import com.jetpackduba.gitnuro.ui.components.AdjustableOutlinedTextField
|
||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||
@ -166,7 +166,7 @@ private fun CloneInput(
|
||||
Icon(
|
||||
Icons.Default.Search,
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colors.primaryTextColor,
|
||||
tint = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -248,7 +248,7 @@ private fun Cloning(cloneViewModel: CloneViewModel, cloneStatusValue: CloneStatu
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
) {
|
||||
|
||||
Text(cloneStatusValue.taskName, color = MaterialTheme.colors.primaryTextColor)
|
||||
Text(cloneStatusValue.taskName, color = MaterialTheme.colors.onBackground)
|
||||
|
||||
if (progress >= 0f)
|
||||
CircularProgressIndicator(
|
||||
@ -295,7 +295,7 @@ private fun Cancelling() {
|
||||
|
||||
Text(
|
||||
text = "Cancelling clone operation...",
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
modifier = Modifier.padding(vertical = 16.dp),
|
||||
)
|
||||
}
|
||||
|
@ -81,6 +81,7 @@ fun EditRemotesDialog(
|
||||
) {
|
||||
Text(
|
||||
text = "Remotes",
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
style = MaterialTheme.typography.h3,
|
||||
modifier = Modifier.padding(vertical = 8.dp),
|
||||
)
|
||||
@ -95,7 +96,7 @@ fun EditRemotesDialog(
|
||||
Icon(
|
||||
imageVector = Icons.Default.Clear,
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colors.primaryTextColor,
|
||||
tint = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -121,7 +122,7 @@ fun EditRemotesDialog(
|
||||
|
||||
Text(
|
||||
text = remote.remoteName,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.handMouseClickable {
|
||||
@ -176,7 +177,7 @@ fun EditRemotesDialog(
|
||||
Icon(
|
||||
painter = painterResource("add.svg"),
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colors.primaryTextColor,
|
||||
tint = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
IconButton(
|
||||
@ -193,7 +194,7 @@ fun EditRemotesDialog(
|
||||
painter = painterResource("remove.svg"),
|
||||
contentDescription = null,
|
||||
tint = if (selectedRemote != null)
|
||||
MaterialTheme.colors.primaryTextColor
|
||||
MaterialTheme.colors.onBackground
|
||||
else
|
||||
MaterialTheme.colors.secondaryTextColor,
|
||||
)
|
||||
@ -211,7 +212,7 @@ fun EditRemotesDialog(
|
||||
if (selectedRemote.isNew) {
|
||||
Text(
|
||||
text = "New remote name",
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
modifier = Modifier.padding(top = 8.dp),
|
||||
)
|
||||
|
||||
@ -237,7 +238,7 @@ fun EditRemotesDialog(
|
||||
|
||||
Text(
|
||||
text = "Fetch URL",
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
modifier = Modifier.padding(top = 8.dp),
|
||||
)
|
||||
|
||||
@ -257,7 +258,7 @@ fun EditRemotesDialog(
|
||||
|
||||
Text(
|
||||
text = "Push URL",
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
modifier = Modifier.padding(top = 8.dp),
|
||||
)
|
||||
|
||||
@ -305,7 +306,7 @@ fun EditRemotesDialog(
|
||||
color = if (remoteChanged)
|
||||
MaterialTheme.colors.primaryVariant
|
||||
else
|
||||
MaterialTheme.colors.primaryTextColor,
|
||||
MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ fun MaterialDialog(
|
||||
alignment: Alignment = Alignment.Center,
|
||||
paddingHorizontal: Dp = 16.dp,
|
||||
paddingVertical: Dp = 16.dp,
|
||||
background: Color = MaterialTheme.colors.background,
|
||||
background: Color = MaterialTheme.colors.surface,
|
||||
onCloseRequested: () -> Unit = {},
|
||||
content: @Composable () -> Unit
|
||||
) {
|
||||
|
@ -2,10 +2,7 @@ package com.jetpackduba.gitnuro.ui.dialogs
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.OutlinedTextField
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.material.TextButton
|
||||
import androidx.compose.material.*
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
@ -13,12 +10,16 @@ import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.focus.focusProperties
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import androidx.compose.ui.input.key.onPreviewKeyEvent
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
||||
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
||||
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
|
||||
import com.jetpackduba.gitnuro.theme.secondaryTextColor
|
||||
import com.jetpackduba.gitnuro.ui.components.AdjustableOutlinedTextField
|
||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||
|
||||
@Composable
|
||||
@ -32,21 +33,38 @@ fun PasswordDialog(
|
||||
|
||||
MaterialDialog(onCloseRequested = onReject) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.background(MaterialTheme.colors.background),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Center,
|
||||
) {
|
||||
|
||||
Text(
|
||||
text = "Introduce your default SSH key's password",
|
||||
Icon(
|
||||
painterResource("lock.svg"),
|
||||
contentDescription = null,
|
||||
modifier = Modifier
|
||||
.padding(vertical = 8.dp),
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
.size(64.dp)
|
||||
.padding(vertical = 16.dp),
|
||||
tint = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
OutlinedTextField(
|
||||
|
||||
Text(
|
||||
text = "Introduce your SSH key's password",
|
||||
modifier = Modifier
|
||||
.padding(bottom = 8.dp),
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
style = MaterialTheme.typography.body1,
|
||||
)
|
||||
|
||||
Text(
|
||||
text = "Your SSH key is protected with a password",
|
||||
modifier = Modifier
|
||||
.padding(bottom = 16.dp),
|
||||
color = MaterialTheme.colors.secondaryTextColor,
|
||||
style = MaterialTheme.typography.body2,
|
||||
textAlign = TextAlign.Center,
|
||||
)
|
||||
|
||||
AdjustableOutlinedTextField(
|
||||
modifier = Modifier
|
||||
.padding(bottom = 8.dp)
|
||||
.focusRequester(passwordFieldFocusRequester)
|
||||
.focusProperties {
|
||||
this.next = buttonFieldFocusRequester
|
||||
@ -61,14 +79,7 @@ fun PasswordDialog(
|
||||
}
|
||||
},
|
||||
value = passwordField,
|
||||
singleLine = true,
|
||||
label = {
|
||||
Text(
|
||||
"Password",
|
||||
style = MaterialTheme.typography.body1.copy(MaterialTheme.colors.primaryVariant),
|
||||
)
|
||||
},
|
||||
textStyle = MaterialTheme.typography.body1,
|
||||
maxLines = 1,
|
||||
colors = outlinedTextFieldColors(),
|
||||
onValueChange = {
|
||||
passwordField = it
|
||||
|
@ -14,7 +14,7 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.jetpackduba.gitnuro.git.log.ResetType
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
|
||||
import com.jetpackduba.gitnuro.theme.textButtonColors
|
||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||
|
||||
@ -109,7 +109,7 @@ fun RadioButtonText(
|
||||
Text(
|
||||
text = text,
|
||||
modifier = Modifier.padding(horizontal = 8.dp),
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
}
|
@ -18,7 +18,7 @@ import androidx.compose.ui.unit.dp
|
||||
import com.jetpackduba.gitnuro.keybindings.KeybindingOption
|
||||
import com.jetpackduba.gitnuro.keybindings.matchesBinding
|
||||
import com.jetpackduba.gitnuro.theme.outlinedTextFieldColors
|
||||
import com.jetpackduba.gitnuro.theme.primaryTextColor
|
||||
|
||||
import com.jetpackduba.gitnuro.theme.textButtonColors
|
||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||
|
||||
@ -49,7 +49,7 @@ fun UserPasswordDialog(
|
||||
text = "Introduce your remote server credentials",
|
||||
modifier = Modifier
|
||||
.padding(vertical = 8.dp),
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
|
||||
OutlinedTextField(
|
||||
|
@ -62,7 +62,7 @@ fun SettingsDialog(
|
||||
Text(
|
||||
text = "Settings",
|
||||
style = MaterialTheme.typography.h3,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
modifier = Modifier.padding(top = 8.dp, bottom = 16.dp)
|
||||
)
|
||||
|
||||
@ -247,7 +247,7 @@ fun Category(
|
||||
.handMouseClickable(onClick)
|
||||
.padding(8.dp),
|
||||
style = MaterialTheme.typography.body1,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
|
||||
@ -278,7 +278,7 @@ fun <T : DropDownOption> SettingDropDown(
|
||||
Text(
|
||||
text = currentOption.optionName,
|
||||
style = MaterialTheme.typography.body1,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
modifier = Modifier.weight(1f),
|
||||
maxLines = 1
|
||||
)
|
||||
@ -286,7 +286,7 @@ fun <T : DropDownOption> SettingDropDown(
|
||||
Icon(
|
||||
painter = painterResource("dropdown.svg"),
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colors.primaryTextColor,
|
||||
tint = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
|
||||
@ -328,7 +328,7 @@ fun SettingButton(
|
||||
OutlinedButton(onClick = onClick) {
|
||||
Text(
|
||||
text = buttonText,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
style = MaterialTheme.typography.body1,
|
||||
)
|
||||
}
|
||||
@ -462,7 +462,7 @@ private fun FieldTitles(
|
||||
) {
|
||||
Text(
|
||||
text = title,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
style = MaterialTheme.typography.body1,
|
||||
)
|
||||
|
||||
|
@ -226,7 +226,7 @@ fun SideTitle(text: String) {
|
||||
Text(
|
||||
text = text,
|
||||
fontSize = 20.sp,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
|
||||
@ -504,7 +504,7 @@ fun HunkHeader(
|
||||
) {
|
||||
Text(
|
||||
text = header,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
style = MaterialTheme.typography.body1,
|
||||
)
|
||||
|
||||
@ -602,7 +602,7 @@ private fun DiffHeader(
|
||||
Image(
|
||||
painter = painterResource("close.svg"),
|
||||
contentDescription = "Close diff",
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.primaryTextColor),
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.onBackground),
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -616,7 +616,7 @@ fun DiffTypeButtons(diffType: TextDiffType, onChangeDiffType: (TextDiffType) ->
|
||||
) {
|
||||
Text(
|
||||
"Unified",
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
style = MaterialTheme.typography.caption,
|
||||
)
|
||||
|
||||
@ -639,7 +639,7 @@ fun DiffTypeButtons(diffType: TextDiffType, onChangeDiffType: (TextDiffType) ->
|
||||
|
||||
Text(
|
||||
"Split",
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
// modifier = Modifier.padding(horizontal = 4.dp),
|
||||
style = MaterialTheme.typography.caption,
|
||||
)
|
||||
@ -706,7 +706,7 @@ private fun PathOnlyDiffHeader(
|
||||
Image(
|
||||
painter = painterResource("close.svg"),
|
||||
contentDescription = "Close diff",
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.primaryTextColor),
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colors.onBackground),
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -820,7 +820,7 @@ fun LineNumber(text: String, remarked: Boolean) {
|
||||
.padding(start = 8.dp, end = 4.dp),
|
||||
fontFamily = FontFamily.Monospace,
|
||||
style = MaterialTheme.typography.body2,
|
||||
color = if (remarked) MaterialTheme.colors.primaryTextColor else MaterialTheme.colors.secondaryTextColor,
|
||||
color = if (remarked) MaterialTheme.colors.onBackground else MaterialTheme.colors.secondaryTextColor,
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -409,7 +409,7 @@ fun MessagesList(
|
||||
) {
|
||||
Text(
|
||||
text = "The commits list has been limited to $commitsLimit. Access the settings to change it.",
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
fontStyle = FontStyle.Italic,
|
||||
style = MaterialTheme.typography.body2,
|
||||
maxLines = 1,
|
||||
@ -600,7 +600,7 @@ fun GraphHeader(
|
||||
Icons.Default.Search,
|
||||
modifier = Modifier.size(18.dp),
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colors.primaryTextColor,
|
||||
tint = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -639,7 +639,7 @@ fun UncommitedChangesLine(
|
||||
modifier = Modifier.padding(start = 16.dp),
|
||||
style = MaterialTheme.typography.body2,
|
||||
maxLines = 1,
|
||||
color = MaterialTheme.colors.primaryTextColor,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
@ -844,7 +844,7 @@ fun CommitMessage(
|
||||
.padding(start = 8.dp)
|
||||
.weight(1f),
|
||||
style = MaterialTheme.typography.body2,
|
||||
color = if (matchesSearchFilter == false) MaterialTheme.colors.secondaryTextColor else MaterialTheme.colors.primaryTextColor,
|
||||
color = if (matchesSearchFilter == false) MaterialTheme.colors.secondaryTextColor else MaterialTheme.colors.onBackground,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
)
|
||||
@ -1137,6 +1137,7 @@ fun RefChip(
|
||||
Text(
|
||||
text = ref.simpleLogName,
|
||||
style = MaterialTheme.typography.body2,
|
||||
color = MaterialTheme.colors.onBackground,
|
||||
maxLines = 1,
|
||||
modifier = Modifier.padding(horizontal = 6.dp)
|
||||
)
|
||||
|
1
src/main/resources/lock.svg
Normal file
1
src/main/resources/lock.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g fill="none"><path d="M0 0h24v24H0V0z"/><path d="M0 0h24v24H0V0z" opacity=".87"/></g><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"/></svg>
|
After Width: | Height: | Size: 426 B |
Loading…
Reference in New Issue
Block a user