AGPL-3.0-only, a source link in the app, and everything on dev since #5 #6
@@ -9,8 +9,10 @@ import androidx.compose.material3.Text
|
|||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.clip
|
import androidx.compose.ui.draw.clip
|
||||||
|
import androidx.compose.ui.res.stringResource
|
||||||
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 com.fabledsword.inkwell.R
|
||||||
|
|
||||||
/** The corner of every chip on a card: tags, reminders, who shared it. */
|
/** The corner of every chip on a card: tags, reminders, who shared it. */
|
||||||
internal val CHIP_RADIUS = 6.dp
|
internal val CHIP_RADIUS = 6.dp
|
||||||
@@ -36,3 +38,14 @@ internal fun TintChip(
|
|||||||
.padding(horizontal = 6.dp, vertical = 2.dp),
|
.padding(horizontal = 6.dp, vertical = 2.dp),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Marks a tag the note's text carries, beside its name, wherever tags are listed. */
|
||||||
|
@Composable
|
||||||
|
internal fun FromTextMark() {
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.label_from_tag),
|
||||||
|
style = MaterialTheme.typography.labelSmall,
|
||||||
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
|
modifier = Modifier.padding(start = 8.dp),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|||||||
@@ -381,12 +381,7 @@ fun EditorLabelRow(
|
|||||||
.padding(horizontal = 10.dp, vertical = 4.dp),
|
.padding(horizontal = 10.dp, vertical = 4.dp),
|
||||||
)
|
)
|
||||||
if (label.viaTag) {
|
if (label.viaTag) {
|
||||||
Text(
|
FromTextMark()
|
||||||
text = stringResource(R.string.label_from_tag),
|
|
||||||
style = MaterialTheme.typography.labelSmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
modifier = Modifier.padding(start = 8.dp),
|
|
||||||
)
|
|
||||||
} else if (!readOnly) {
|
} else if (!readOnly) {
|
||||||
IconButton(onClick = {
|
IconButton(onClick = {
|
||||||
// Only the MANUAL labels are sent: the core replaces
|
// Only the MANUAL labels are sent: the core replaces
|
||||||
|
|||||||
@@ -120,14 +120,7 @@ fun LabelSheet(
|
|||||||
style = MaterialTheme.typography.bodyLarge,
|
style = MaterialTheme.typography.bodyLarge,
|
||||||
modifier = Modifier.padding(start = 4.dp),
|
modifier = Modifier.padding(start = 4.dp),
|
||||||
)
|
)
|
||||||
if (fromTag) {
|
if (fromTag) FromTextMark()
|
||||||
Text(
|
|
||||||
text = stringResource(R.string.label_from_tag),
|
|
||||||
style = MaterialTheme.typography.labelSmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
modifier = Modifier.padding(start = 8.dp),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user