Skip to content

Build your personal knowledge base with Trilium Notes

style/image viewer: use overlay buttons for zoom

Adorian Doranaf44b3782193
diff --git a/apps/client/src/widgets/react/ImageViewer.css b/apps/client/src/widgets/react/ImageViewer.css
index 73e66b3aa1..31848aedb3 100644
--- a/apps/client/src/widgets/react/ImageViewer.css
+++ b/apps/client/src/widgets/react/ImageViewer.css
@@ -12,9 +12,6 @@
inset-inline-end: 10px;
bottom: 10px;
z-index: 1;
- display: flex;
- align-items: center;
- gap: 4px;
}
/* Make the library's viewport fill the available space so the image fits and pans within it. */
diff --git a/apps/client/src/widgets/react/ImageViewer.tsx b/apps/client/src/widgets/react/ImageViewer.tsx
index 568c67c4b3..0dbf856cdd 100644
--- a/apps/client/src/widgets/react/ImageViewer.tsx
+++ b/apps/client/src/widgets/react/ImageViewer.tsx
@@ -157,18 +157,18 @@ export default function ImageViewer({ src, imgClassName, alt = "", minScale = 0.
)}
{!isMobile() && loaded && (
- <div className="image-viewer-controls">
+ <div className="image-viewer-controls tn-overlay-control-group">
<button
ref={zoomOutRef}
type="button"
- className="icon-action bx bx-zoom-out"
+ className="tn-overlay-icon-button bx bx-minus-circle"
aria-label={t("image_buttons.zoom_out")}
onClick={() => zoomRef.current?.zoomOut(BUTTON_ZOOM_STEP)}
/>
<button
ref={zoomLevelRef}
type="button"
- className="image-viewer-zoom-level"
+ className="tn-overlay-text-button image-viewer-zoom-level"
aria-label={t("image_buttons.reset_zoom")}
onClick={() => zoomRef.current?.resetTransform()}
>
@@ -177,7 +177,7 @@ export default function ImageViewer({ src, imgClassName, alt = "", minScale = 0.
<button
ref={zoomInRef}
type="button"
- className="icon-action bx bx-zoom-in"
+ className="tn-overlay-icon-button bx bx-plus-circle"
aria-label={t("image_buttons.zoom_in")}
onClick={() => zoomRef.current?.zoomIn(BUTTON_ZOOM_STEP)}
/>