-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💄 Implement a detailed display interface for Text type pasted items
- Loading branch information
1 parent
c828daa
commit 694967e
Showing
5 changed files
with
66 additions
and
8 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
composeApp/src/commonMain/kotlin/com/clipevery/ui/clip/detail/ClipDetailView.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.clipevery.ui.clip.detail | ||
|
||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.dp | ||
|
||
@Composable | ||
fun ClipDetailView(detailView: @Composable () -> Unit) { | ||
Column( | ||
modifier = Modifier.fillMaxWidth().height(200.dp).padding(10.dp), | ||
) { | ||
detailView() | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
composeApp/src/commonMain/kotlin/com/clipevery/ui/clip/detail/ClipTextDetailView.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.clipevery.ui.clip.detail | ||
|
||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.material.MaterialTheme | ||
import androidx.compose.material.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.text.TextStyle | ||
import androidx.compose.ui.text.font.FontFamily | ||
import androidx.compose.ui.text.font.FontWeight | ||
import androidx.compose.ui.text.style.TextOverflow | ||
import androidx.compose.ui.unit.sp | ||
import com.clipevery.clip.item.ClipText | ||
|
||
@Composable | ||
fun ClipTextDetailView(clipText: ClipText) { | ||
val text = clipText.text | ||
Text( | ||
text = text, | ||
modifier = Modifier.fillMaxSize(), | ||
overflow = TextOverflow.Ellipsis, | ||
style = | ||
TextStyle( | ||
fontWeight = FontWeight.Normal, | ||
fontFamily = FontFamily.SansSerif, | ||
color = MaterialTheme.colors.onBackground, | ||
fontSize = 14.sp, | ||
), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters