Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Commit

Permalink
closes #141
Browse files Browse the repository at this point in the history
  • Loading branch information
yamin8000 committed Jul 18, 2023
1 parent 641e933 commit 3058c03
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ android {
applicationId "io.github.yamin8000.owl"
minSdk 21
targetSdk 33
versionCode 18
versionName "1.3.5"
versionCode 19
versionName "1.3.6"
vectorDrawables {
useSupportLibrary true
}
Expand Down
28 changes: 23 additions & 5 deletions app/src/main/java/io/github/yamin8000/owl/ui/composable/Texts.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,18 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
import androidx.compose.foundation.lazy.grid.items
import androidx.compose.foundation.text.selection.LocalTextSelectionColors
import androidx.compose.foundation.text.selection.SelectionContainer
import androidx.compose.foundation.text.selection.TextSelectionColors
import androidx.compose.material.ripple.rememberRipple
import androidx.compose.material3.ElevatedSuggestionChip
import androidx.compose.material3.Icon
import androidx.compose.material3.LocalTextStyle
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
Expand Down Expand Up @@ -253,11 +258,24 @@ fun CopyAbleRippleTextWithIcon(
PersianText(title)
}
)
CopyAbleRippleText(
text = text,
content = content,
onClick = onClick,
onDoubleClick = onDoubleClick
val selectionColors = TextSelectionColors(
handleColor = MaterialTheme.colorScheme.secondary,
backgroundColor = MaterialTheme.colorScheme.onSecondary
)
CompositionLocalProvider(
values = arrayOf(LocalTextSelectionColors provides selectionColors),
content = {
SelectionContainer(
content = {
CopyAbleRippleText(
text = text,
content = content,
onClick = onClick,
onDoubleClick = onDoubleClick
)
}
)
}
)
}
)
Expand Down

0 comments on commit 3058c03

Please sign in to comment.