Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Clean up

Ilya0bc925b81bdc
diff --git a/apps/desktop/src-tauri/src/windows.rs b/apps/desktop/src-tauri/src/windows.rs
index 4f99d5476..ca0e02643 100644
--- a/apps/desktop/src-tauri/src/windows.rs
+++ b/apps/desktop/src-tauri/src/windows.rs
@@ -13,6 +13,9 @@ use tauri::{
#[cfg(target_os = "macos")]
const DEFAULT_TRAFFIC_LIGHTS_INSET: LogicalPosition<f64> = LogicalPosition::new(12.0, 12.0);
+#[cfg(target_os = "windows")]
+const WIN_WSCAPTION_WSTHICKFRAME_LOGICAL_SIZE: tauri::LogicalSize<f64> = tauri::LogicalSize::new(12.0, 35.0);
+
#[derive(Clone)]
pub enum CapWindowId {
// Contains onboarding + permissions
@@ -254,8 +257,8 @@ impl ShowCapWindow {
let mut height = 40.0;
#[cfg(target_os = "windows")]
{
- width -= 12.0;
- height -= 35.0
+ width -= WIN_WSCAPTION_WSTHICKFRAME_LOGICAL_SIZE.width;
+ height -= WIN_WSCAPTION_WSTHICKFRAME_LOGICAL_SIZE.height;
}
self.window_builder(app, "/in-progress-recording")
@@ -404,7 +407,10 @@ impl ShowCapWindow {
| Self::InProgressRecording { .. }
| Self::Upgrade
) {
- (min.0 - 12.0, min.1 - 35.0)
+ (
+ min.0 - WIN_WSCAPTION_WSTHICKFRAME_LOGICAL_SIZE.width,
+ min.1 - WIN_WSCAPTION_WSTHICKFRAME_LOGICAL_SIZE.height,
+ )
} else {
min
};
diff --git a/apps/desktop/src/components/titlebar/controls/CaptionControlsWindows11.tsx b/apps/desktop/src/components/titlebar/controls/CaptionControlsWindows11.tsx
index e4d1684c1..acdd92e9e 100644
--- a/apps/desktop/src/components/titlebar/controls/CaptionControlsWindows11.tsx
+++ b/apps/desktop/src/components/titlebar/controls/CaptionControlsWindows11.tsx
@@ -22,9 +22,6 @@ export default function (props: ComponentProps<"div">) {
local.class,
focused() ? "*:text-black-transparent-80" : "*:text-black-transparent-40"
)}
- style={{
- "z-index": 99999999,
- }}
{...otherProps}
>
<ControlButton
diff --git a/apps/desktop/src/routes/in-progress-recording.tsx b/apps/desktop/src/routes/in-progress-recording.tsx
index 3e2475693..07b0627bd 100644
--- a/apps/desktop/src/routes/in-progress-recording.tsx
+++ b/apps/desktop/src/routes/in-progress-recording.tsx
@@ -169,7 +169,7 @@ export default function () {
</div>
</div>
<div
- class="bg-transparent non-styled-move cursor-move flex items-center justify-center p-[0.25rem] border-l border-gray-400 dark:border-gray-200 hover:cursor-move"
+ class="non-styled-move cursor-move flex items-center justify-center p-[0.25rem] border-l border-gray-400 dark:border-gray-200 hover:cursor-move"
data-tauri-drag-region
>
<IconCapMoreVertical class="pointer-events-none text-gray-400 dark:text-gray-400" />