fix(ui): make the article title selectable

The title Text sat outside any SelectionContainer, so the headword
could not be copied.
This commit is contained in:
OneWay authored and Evgenii committed 2026-09-21 13:24:41 +08:00
1 parent c0c9211b82
commit 4caf3a534d
1 file changed
+13 -11
@@ -248,17 +248,19 @@ fun ArticleTitleBar(
} }
} }
Text( SelectionContainer {
text = title, Text(
style = MaterialTheme.typography.dictionaryTitleLarge, text = title,
color = MaterialTheme.colorScheme.onSurface, style = MaterialTheme.typography.dictionaryTitleLarge,
maxLines = 1, color = MaterialTheme.colorScheme.onSurface,
overflow = TextOverflow.Ellipsis, maxLines = 1,
modifier = Modifier overflow = TextOverflow.Ellipsis,
.padding(start = if (showBackButton) Spacing.searchTextStart - Spacing.iconStart - 24.dp else 16.dp) modifier = Modifier
.testTag("article_title") .padding(start = if (showBackButton) Spacing.searchTextStart - Spacing.iconStart - 24.dp else 16.dp)
.semantics { testTagsAsResourceId = true } .testTag("article_title")
) .semantics { testTagsAsResourceId = true }
)
}
} }
} }
} }