android, desktop: blur for media (#4508)

* android, desktop: blur for media

* change

* new option and applied blur to other elements

* new line

* added to migration

* long click handling

* hover on desktop

* changes

* change

* showDownloadButton function

* file rename

* don't blur when menu is visible

* rename
This commit is contained in:
Stanislav Dmitrenko
2024-07-26 09:29:13 +01:00
committed by GitHub
parent a53333be20
commit 032c5d3a5b
12 changed files with 216 additions and 34 deletions
@@ -4,8 +4,7 @@ import androidx.compose.foundation.contextMenuOpenDetector
import androidx.compose.runtime.Composable
import androidx.compose.ui.*
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.input.pointer.PointerIcon
import androidx.compose.ui.input.pointer.pointerHoverIcon
import androidx.compose.ui.input.pointer.*
import java.io.File
import java.net.URI
@@ -40,3 +39,8 @@ onExternalDrag(enabled) {
actual fun Modifier.onRightClick(action: () -> Unit): Modifier = contextMenuOpenDetector { action() }
actual fun Modifier.desktopPointerHoverIconHand(): Modifier = Modifier.pointerHoverIcon(PointerIcon.Hand)
actual fun Modifier.desktopOnHovered(action: (Boolean) -> Unit): Modifier =
this then Modifier
.onPointerEvent(PointerEventType.Enter) { action(true) }
.onPointerEvent(PointerEventType.Exit) { action(false) }