Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Improve UI button hover/active styles and window shadow

Richie McIlroy06d5dc825f8f
diff --git a/apps/desktop/src-tauri/src/windows.rs b/apps/desktop/src-tauri/src/windows.rs
index 8fa1eb331..a88dc4bc3 100644
--- a/apps/desktop/src-tauri/src/windows.rs
+++ b/apps/desktop/src-tauri/src/windows.rs
@@ -705,7 +705,7 @@ impl ShowCapWindow {
.maximized(false)
.resizable(false)
.fullscreen(false)
- .shadow(!cfg!(windows))
+ .shadow(false)
.always_on_top(true)
.transparent(true)
.visible_on_all_workspaces(true)
@@ -727,6 +727,8 @@ impl ShowCapWindow {
crate::platform::set_window_level(window.as_ref().window(), 1000);
}
+ fake_window::spawn_fake_window_listener(app.clone(), window.clone());
+
window
}
Self::RecordingsOverlay => {
diff --git a/apps/desktop/src/routes/in-progress-recording.tsx b/apps/desktop/src/routes/in-progress-recording.tsx
index a735ab17a..050f7c21a 100644
--- a/apps/desktop/src/routes/in-progress-recording.tsx
+++ b/apps/desktop/src/routes/in-progress-recording.tsx
@@ -555,7 +555,7 @@ export default function () {
disabled={
stopRecording.isPending || isInitializing() || isCountdown()
}
- class="flex flex-row items-center gap-[0.25rem] rounded-lg py-[0.25rem] px-[0.5rem] text-red-300 transition-opacity disabled:opacity-60"
+ class="flex flex-row items-center gap-[0.25rem] rounded-lg py-[0.25rem] px-[0.5rem] text-red-300 transition-colors duration-100 hover:bg-red-500/[0.08] active:bg-red-500/[0.12] disabled:opacity-60 disabled:hover:bg-transparent"
type="button"
onClick={() => stopRecording.mutate()}
title="Stop recording"
@@ -728,7 +728,7 @@ export default function () {
</div>
</div>
<div
- class="non-styled-move flex cursor-move items-center justify-center border-l border-gray-5 p-[0.25rem] hover:cursor-move"
+ class="non-styled-move flex cursor-move items-center justify-center border-l border-gray-5 p-[0.25rem] hover:cursor-move transition-colors duration-100 hover:bg-gray-12/[0.04] dark:hover:bg-white/[0.06]"
data-tauri-drag-region
>
<IconCapMoreVertical class="pointer-events-none text-gray-10" />
@@ -745,10 +745,12 @@ function ActionButton(props: ComponentProps<"button">) {
<button
{...props}
class={cx(
- "p-[0.25rem] rounded-lg transition-all",
- "text-gray-11",
+ "p-[0.25rem] rounded-lg transition-colors duration-100",
+ "text-gray-11 hover:text-gray-12",
+ "hover:bg-gray-12/[0.06] dark:hover:bg-white/[0.08]",
+ "active:bg-gray-12/[0.1] dark:active:bg-white/[0.12]",
"h-8 w-8 flex items-center justify-center",
- "disabled:opacity-50 disabled:cursor-not-allowed",
+ "disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent",
props.class,
)}
type="button"