Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

viewer 1

Manav Rathi768b2f8e660d
diff --git a/web/apps/photos/src/components/PhotoViewer/index.tsx b/web/apps/photos/src/components/PhotoViewer/index.tsx
index 16e5efe6ae..7ba610e616 100644
--- a/web/apps/photos/src/components/PhotoViewer/index.tsx
+++ b/web/apps/photos/src/components/PhotoViewer/index.tsx
@@ -1,4 +1,4 @@
-import { isDesktop } from "@/base/app";
+import { isDesktop, wipDesktopCustomTitlebar } from "@/base/app";
import { assertionFailed } from "@/base/assert";
import { Overlay } from "@/base/components/containers";
import { FilledIconButton, type ButtonishProps } from "@/base/components/mui";
@@ -805,7 +805,17 @@ export const PhotoViewer: React.FC<PhotoViewerProps> = ({
<div className="pswp__item" />
</div>
<div className="pswp__ui pswp__ui--hidden">
- <div className="pswp__top-bar">
+ <div
+ className="pswp__top-bar"
+ {...(wipDesktopCustomTitlebar
+ ? {
+ style: {
+ "--ente-pswp-top-bar-top":
+ "env(titlebar-area-height, 30px)",
+ } as React.CSSProperties,
+ }
+ : {})}
+ >
<div className="pswp__counter" />
<button
diff --git a/web/apps/photos/src/styles/global.css b/web/apps/photos/src/styles/global.css
index 9c4f6354fc..b9a3ac578d 100644
--- a/web/apps/photos/src/styles/global.css
+++ b/web/apps/photos/src/styles/global.css
@@ -35,6 +35,11 @@ body {
object-fit: contain;
}
+/* Need this in CSS instead of as an inline style to increase specificity. */
+.pswp__top-bar.pswp__top-bar {
+ top: var(--ente-pswp-top-bar-top, 0px);
+}
+
.pswp-item-container > * {
position: absolute;
transition: opacity 1s ease;