feat: make text in the GUI app selectable (Closes #15)
Wrap the main content Column in SelectionContainer to enable text selection and copying for all Text composables in the Compose Desktop GUI.
This commit was merged in pull request #16.
This commit is contained in:
@@ -2,6 +2,7 @@ package de.pfadfinder.songbook.gui
|
|||||||
|
|
||||||
import androidx.compose.desktop.ui.tooling.preview.Preview
|
import androidx.compose.desktop.ui.tooling.preview.Preview
|
||||||
import androidx.compose.foundation.VerticalScrollbar
|
import androidx.compose.foundation.VerticalScrollbar
|
||||||
|
import androidx.compose.foundation.text.selection.SelectionContainer
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
@@ -85,6 +86,7 @@ fun App() {
|
|||||||
|
|
||||||
MaterialTheme {
|
MaterialTheme {
|
||||||
Surface(modifier = Modifier.fillMaxSize()) {
|
Surface(modifier = Modifier.fillMaxSize()) {
|
||||||
|
SelectionContainer {
|
||||||
Column(modifier = Modifier.padding(16.dp)) {
|
Column(modifier = Modifier.padding(16.dp)) {
|
||||||
// Project directory selection
|
// Project directory selection
|
||||||
Text(
|
Text(
|
||||||
@@ -339,6 +341,7 @@ fun App() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
enum class MessageType {
|
enum class MessageType {
|
||||||
INFO, SUCCESS, ERROR
|
INFO, SUCCESS, ERROR
|
||||||
|
|||||||
Reference in New Issue
Block a user