Skip to content

Commit

Permalink
version 1.0.1 (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoberaldin committed May 3, 2023
1 parent 603ce18 commit fdb8dc1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<p align="center"><img width="310" src="https://user-images.githubusercontent.com/2738294/235072055-603950db-78b3-4011-8a4e-2f870783f423.png" /></p>
<p align="center"><img width="300" src="https://user-images.githubusercontent.com/2738294/235072055-603950db-78b3-4011-8a4e-2f870783f423.png" /></p>

# MetaTermKotlin
# MetaTerm

An open soure terminology management solution.
An open source terminology management solution. The main goal of this app is to help translators to manage their glossaries in a structured but at the same time highly configurable way. Termbases are a highly valuable resource and require time to be built and validated, they are key for professionals to adapt to their customers' and domain requirements while ensuring consistency and high quality. One of the main concerns of my approach to terminology management is that one's data must always reside on one's own machine, so terminological entries must be stored in a *local* database and be never sent over the network.

## Rationale

Expand Down
16 changes: 14 additions & 2 deletions core-common/src/jvmMain/kotlin/ui/components/CustomTextField.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ import androidx.compose.foundation.text.BasicTextField
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextRange
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import ui.theme.Spacing
Expand Down Expand Up @@ -45,21 +51,27 @@ fun CustomTextField(
)
Spacer(modifier = Modifier.height(Spacing.s))
}
var value by remember {
mutableStateOf(TextFieldValue(value))
}
BasicTextField(
modifier = Modifier.fillMaxWidth()
.weight(1f)
.background(color = Color.White, shape = RoundedCornerShape(4.dp))
.padding(horizontal = Spacing.xs, vertical = Spacing.xs),
value = value,
onValueChange = onValueChange,
onValueChange = {
value = it.copy(selection = TextRange(it.text.length))
onValueChange(it.text)
},
textStyle = MaterialTheme.typography.caption,
singleLine = singleLine,
decorationBox = { innerTextField ->
Box(
modifier = Modifier.padding(horizontal = Spacing.xs, vertical = Dp.Hairline),
contentAlignment = Alignment.TopStart,
) {
if (hint.isNotEmpty() && value.isEmpty()) {
if (hint.isNotEmpty() && value.text.isEmpty()) {
Text(
text = hint,
style = MaterialTheme.typography.caption,
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ essenty = "1.1.0"
redundent = "1.9.0"
sl4j = "1.7.30"

appVersion = "1.0.0"
buildNumber = "1"
appVersion = "1.0.1"
buildNumber = "2"

[libraries]
# DI
Expand Down

0 comments on commit fdb8dc1

Please sign in to comment.