File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
app/src/commonMain/kotlin/com/crosspaste/paste Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,10 @@ import androidx.compose.material.icons.outlined.Image
88import androidx.compose.material.icons.outlined.Link
99import androidx.compose.material.icons.outlined.Palette
1010import androidx.compose.material.icons.outlined.TextFields
11+ import androidx.compose.runtime.Composable
1112import androidx.compose.ui.graphics.Color
1213import androidx.compose.ui.graphics.vector.ImageVector
14+ import com.crosspaste.ui.LocalThemeExtState
1315
1416data class PasteTypeExt (
1517 val imageVector : ImageVector ,
@@ -116,3 +118,18 @@ data class PasteTypeExt(
116118 )
117119 }
118120}
121+
122+ @Composable
123+ fun PasteType.getPasteTypeExt (): PasteTypeExt {
124+ val themeExt = LocalThemeExtState .current
125+ return when (this ) {
126+ PasteType .TEXT_TYPE -> themeExt.textPasteTypeExt
127+ PasteType .URL_TYPE -> themeExt.urlPasteTypeExt
128+ PasteType .HTML_TYPE -> themeExt.htmlPasteTypeExt
129+ PasteType .FILE_TYPE -> themeExt.filePasteTypeExt
130+ PasteType .IMAGE_TYPE -> themeExt.imagePasteTypeExt
131+ PasteType .RTF_TYPE -> themeExt.rtfPasteTypeExt
132+ PasteType .COLOR_TYPE -> themeExt.colorPasteTypeExt
133+ else -> themeExt.textPasteTypeExt
134+ }
135+ }
You can’t perform that action at this time.
0 commit comments