Skip to content

Build your personal knowledge base with Trilium Notes

client/media player: tweak the lazy previews

Adorian Doran8b66f149a478
diff --git a/apps/client/src/widgets/type_widgets/file/MediaProxy.css b/apps/client/src/widgets/type_widgets/file/MediaProxy.css
index 3465b4c55e..4dfddbe34e 100644
--- a/apps/client/src/widgets/type_widgets/file/MediaProxy.css
+++ b/apps/client/src/widgets/type_widgets/file/MediaProxy.css
@@ -1,5 +1,5 @@
.media-proxy {
- --media-proxy-icon-size: 4rem;
+ --media-proxy-icon-size: 6rem;
position: relative;
width: 100%;
@@ -8,8 +8,8 @@
display: flex;
align-items: center;
justify-content: center;
- background-color: var(--accented-background-color);
- border-radius: 0.5em;
+ /* Transparent: the placeholder sits on the host's own background (card, tile, note) rather than
+ painting a panel of its own. `overflow: hidden` still clips the oversized icon in a short host. */
overflow: hidden;
.media-proxy-icon {
@@ -18,11 +18,9 @@
opacity: 0.15;
}
+ /* A plain icon-action button, only larger: it keeps the standard hover and adds no chrome of its own. */
.media-proxy-play {
--icon-button-size: 56px;
position: relative;
- background-color: var(--main-background-color);
- border-radius: 50%;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
}
diff --git a/apps/client/src/widgets/type_widgets/file/MediaProxy.tsx b/apps/client/src/widgets/type_widgets/file/MediaProxy.tsx
index c951187a68..1a1958df90 100644
--- a/apps/client/src/widgets/type_widgets/file/MediaProxy.tsx
+++ b/apps/client/src/widgets/type_widgets/file/MediaProxy.tsx
@@ -15,7 +15,8 @@ export default function MediaProxy({ source, onActivate }: { source: MediaSource
return (
<div className="media-proxy no-link-navigation">
- <Icon icon={isVideo ? "bx bx-movie-play" : "bx bx-music"} className="media-proxy-icon" />
+ {/* Not bx-movie-play: its play glyph would double up with the button in front of it. */}
+ <Icon icon={isVideo ? "bx bx-movie" : "bx bx-music"} className="media-proxy-icon" />
<ActionButton
className="media-proxy-play"
icon="bx bx-play"