Skip to content

Commit

Permalink
Now only showing asset selection ticks when the mouse is hovered over.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleydavis committed Aug 3, 2024
1 parent fc6d881 commit 2f23428
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions frontend/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ i {
}
}

.selection-tick {
display: none;
}

.gallery-thumb-container:hover .selection-tick {
display: flex;
}

/* Gallery scrollbar */

.gallery-scrollbar {
Expand Down
4 changes: 3 additions & 1 deletion packages/user-interface/src/components/gallery-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export function GalleryImage({ isScrolling, item, onClick, x, y, width, height }

{objectURL
&& <div
className="gallery-thumb-container"
style={{
position: "absolute",
left: `${x}px`,
Expand Down Expand Up @@ -176,6 +177,7 @@ export function GalleryImage({ isScrolling, item, onClick, x, y, width, height }
{/* Selection tick mark. */}

<div
className="selection-tick"
style={{
position: "absolute",
left: "8px",
Expand All @@ -184,10 +186,10 @@ export function GalleryImage({ isScrolling, item, onClick, x, y, width, height }
height: "24px",
borderRadius: "50%",
backgroundColor: isSelected ? "rgba(0, 0, 255, 1)" : "rgba(0, 0, 0, 0.25)",
display: "flex",
justifyContent: "center",
alignItems: "center",
cursor: "pointer",
display: isSelected ? "flex" : undefined,
}}
onClick={event => {
event.preventDefault();
Expand Down

0 comments on commit 2f23428

Please sign in to comment.