diff --git a/src/components/ImageViewerWindow.tsx b/src/components/ImageViewerWindow.tsx index 7afc6ed..d5d7ae8 100644 --- a/src/components/ImageViewerWindow.tsx +++ b/src/components/ImageViewerWindow.tsx @@ -44,20 +44,29 @@ export default function ImageViewerWindow() {
{ if (e.button === 0) win.startDragging(); }} style={{ height: "28px", background: "#161b22", borderBottom: "1px solid #2d3748", - cursor: "grab", flexShrink: 0, display: "flex", alignItems: "center", - paddingLeft: "12px", userSelect: "none", }} > - ⠿ Image + {/* Zone draggable */} +
{ if (e.button === 0) win.startDragging(); }} + style={{ flex: 1, display: "flex", alignItems: "center", paddingLeft: "12px", cursor: "grab", height: "100%" }} + > + ⠿ Image +
+ + {/* Boutons — hors de la zone draggable */} +
+ win.minimize()} title="Réduire">— + win.close()} title="Fermer" danger>✕ +
@@ -72,3 +81,44 @@ export default function ImageViewerWindow() {
); } + +function ViewerTitleButton({ + children, onClick, title, danger, +}: { + children: React.ReactNode; + onClick: () => void; + title?: string; + danger?: boolean; +}) { + return ( + + ); +}