Skip to content

Commit df68315

Browse files
wip
1 parent 7ded393 commit df68315

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

apps/desktop/src-tauri/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ async fn take_screenshot(app: AppHandle, _state: MutableState<'_, App>) -> Resul
12761276

12771277
use cap_project::*;
12781278
RecordingMeta {
1279-
platform: Platform::default(),
1279+
platform: Some(Platform::default()),
12801280
project_path: recording_dir.clone(),
12811281
sharing: None,
12821282
pretty_name: screenshot_name,

apps/desktop/src-tauri/src/recording.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ async fn handle_recording_finish(
772772
};
773773

774774
let meta = RecordingMeta {
775-
platform: Platform::default(),
775+
platform: Some(Platform::default()),
776776
project_path: recording_dir.clone(),
777777
sharing,
778778
pretty_name: format!(

apps/desktop/src-tauri/src/windows.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ pub enum ShowCapWindow {
167167
WindowCaptureOccluder { screen_id: u32 },
168168
CaptureArea { screen_id: u32 },
169169
Camera,
170-
InProgressRecording { position: Option<(f64, f64)> },
170+
InProgressRecording { countdown: Option<u32> },
171171
Upgrade,
172172
ModeSelect,
173173
}
@@ -309,8 +309,6 @@ impl ShowCapWindow {
309309
Self::Camera => {
310310
const WINDOW_SIZE: f64 = 230.0 * 2.0;
311311

312-
let port = app.state::<Arc<RwLock<App>>>().read().await.camera_ws_port;
313-
314312
let mut window_builder = self
315313
.window_builder(app, "/camera")
316314
.maximized(false)
@@ -326,12 +324,6 @@ impl ShowCapWindow {
326324
- WINDOW_SIZE
327325
- 100.0,
328326
)
329-
.initialization_script(&format!(
330-
"
331-
window.__CAP__ = window.__CAP__ ?? {{}};
332-
window.__CAP__.cameraWsPort = {port};
333-
",
334-
))
335327
.transparent(true);
336328

337329
let window = window_builder.build()?;

crates/project/src/meta.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl Default for Platform {
6161
#[derive(Debug, Clone, Serialize, Deserialize, Type)]
6262
pub struct RecordingMeta {
6363
#[serde(default)]
64-
pub platform: Platform,
64+
pub platform: Option<Platform>,
6565
// this field is just for convenience, it shouldn't be persisted
6666
#[serde(skip_serializing, default)]
6767
pub project_path: PathBuf,

crates/rendering/src/layers/cursor.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,18 @@ impl CursorLayer {
304304
let cursor_size_constant =
305305
factor * cursor_size_percentage * zoom.display_amount() as f32;
306306

307-
XY::new(
308-
cursor_size_constant * cursor_texture_size_aspect,
309-
cursor_size_constant,
310-
)
307+
if cursor_texture_size_aspect > 1.0 {
308+
// Wide cursor: base sizing on width to prevent excessive width
309+
let width = cursor_size_constant;
310+
let height = cursor_size_constant / cursor_texture_size_aspect;
311+
XY::new(width, height)
312+
} else {
313+
// Tall or square cursor: base sizing on height (current behavior)
314+
XY::new(
315+
cursor_size_constant * cursor_texture_size_aspect,
316+
cursor_size_constant,
317+
)
318+
}
311319
};
312320

313321
let click_scale_factor = get_click_t(&cursor.clicks, (time_s as f64) * 1000.0)

0 commit comments

Comments
 (0)