Skip to content

Build your personal knowledge base with Trilium Notes

style/keyboard shortcut hints: avoid overlapping with the floating buttons

Adorian Dorand61b54cafd93
diff --git a/apps/client/src/widgets/react/ImageViewer.css b/apps/client/src/widgets/react/ImageViewer.css
index 2e9af76a81..328f10ecb9 100644
--- a/apps/client/src/widgets/react/ImageViewer.css
+++ b/apps/client/src/widgets/react/ImageViewer.css
@@ -6,14 +6,6 @@
outline: none;
}
-/* Zoom controls pinned to the bottom-right corner of the viewport. */
-.image-viewer-controls {
- position: absolute;
- inset-inline-end: 10px;
- bottom: 10px;
- z-index: 1;
-}
-
/* Shortcut-hints button pinned to the top-right corner of the viewport. */
.image-viewer-hint-button {
position: absolute;
diff --git a/apps/client/src/widgets/shortcut_hints/shortcut_hint_button.css b/apps/client/src/widgets/shortcut_hints/shortcut_hint_button.css
index 1f263c1e77..bbdee3ff9b 100644
--- a/apps/client/src/widgets/shortcut_hints/shortcut_hint_button.css
+++ b/apps/client/src/widgets/shortcut_hints/shortcut_hint_button.css
@@ -11,3 +11,20 @@
letter-spacing: .5pt;
}
}
+
+.shortcut-hint-button-group {
+ inset-inline-end: 10px;
+ z-index: 2;
+ transition: opacity .3s;
+ position: absolute;
+ top: 10px;
+}
+
+/* If the floating buttons are displayed, reposition the button group to avoid overlapping
+ * them on the old layout or popup editor. */
+:is(.note-split, .popup-editor-dialog > .modal-dialog > .modal-content > .modal-body):has(
+ > .floating-buttons > .floating-buttons-children.temporarily-hidden,
+ > .floating-buttons > .floating-buttons-children > .close-floating-buttons:not(:first-child)
+) .shortcut-hint-button-group {
+ top: 60px;
+}
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/file/MediaPlayer.css b/apps/client/src/widgets/type_widgets/file/MediaPlayer.css
index d1317e8b80..30e89f8d04 100644
--- a/apps/client/src/widgets/type_widgets/file/MediaPlayer.css
+++ b/apps/client/src/widgets/type_widgets/file/MediaPlayer.css
@@ -1,11 +1,4 @@
/* Contextual shortcut-hints button, floated in the top-right of the full audio/video player. */
-.media-hint-button {
- position: absolute;
- inset-inline-end: 10px;
- top: 10px;
- z-index: 2;
- transition: opacity 300ms ease;
-}
.media-preview-controls {
padding: 1.25em;