WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b753ce4
Update VSCode extension recommendations
richiemcilroy Dec 4, 2025
dd51fcc
Support different minimum crop sizes for screenshot mode
richiemcilroy Dec 4, 2025
0187998
Format VSCode extensions.json file
richiemcilroy Dec 4, 2025
acdd6cc
Add bottom margin to ViewAllButton in TargetMenuGrid
richiemcilroy Dec 4, 2025
97ad9ea
Refactor annotation config UI and remove presets dropdown
richiemcilroy Dec 4, 2025
9222156
try add clippy for windows
richiemcilroy Dec 4, 2025
2b0195c
Add LayersPanel and improve crop dialog logic
richiemcilroy Dec 4, 2025
1c349ea
Refactor crop dialog state in Header component
richiemcilroy Dec 4, 2025
c306d9e
Add keyboard shortcuts and focus pan to Preview
richiemcilroy Dec 4, 2025
0152089
Add layers panel toggle and improve aspect ratio constraints
richiemcilroy Dec 4, 2025
2a63eb0
Merge branch 'main' into screenshot-ux
richiemcilroy Dec 4, 2025
74816b6
Add prettyName to screenshot editor
richiemcilroy Dec 4, 2025
96aac80
Refactor popover state management in screenshot editor
richiemcilroy Dec 4, 2025
c52dcb6
Remove rounded class from PreviewCanvas element
richiemcilroy Dec 4, 2025
8245640
Set default border color to transparent black
richiemcilroy Dec 4, 2025
7d5371a
clippy + coderabbit
richiemcilroy Dec 4, 2025
cbbf665
clippy
richiemcilroy Dec 4, 2025
06d5dc8
Improve UI button hover/active styles and window shadow
richiemcilroy Dec 4, 2025
11daa79
Use clamp for output latency hint calculation
richiemcilroy Dec 4, 2025
293be48
Sync camera preview shape with project config
richiemcilroy Dec 4, 2025
6e87871
Return 0.0 for unsupported sample formats
richiemcilroy Dec 4, 2025
30254ed
Add support for more pixel formats on macOS and Windows
richiemcilroy Dec 4, 2025
d8a452f
Refactor Windows platform code for conciseness and clarity
richiemcilroy Dec 4, 2025
2b5d4bd
Add support for unsigned and 8-bit sample formats
richiemcilroy Dec 4, 2025
dd137a6
Refactor useScreenshotExport to use editorCtx object
richiemcilroy Dec 4, 2025
b6b7975
Refactor static slice and icon extraction logic
richiemcilroy Dec 4, 2025
5fde381
Remove UYVY422 mapping to DXGI_FORMAT_YUY2
richiemcilroy Dec 4, 2025
283e8ef
Remove incorrect mappings in ffmpeg_sample_format_for
richiemcilroy Dec 4, 2025
38a865c
Fix pixel format and plane count handling for frames
richiemcilroy Dec 4, 2025
cf869bc
Refactor memory and time handling in SinkFilter and AMMediaType
richiemcilroy Dec 5, 2025
a97d19e
Refactor frame data access and improve dimension checks
richiemcilroy Dec 5, 2025
cfd4d08
Fix memory handling in AMMediaType::into_inner
richiemcilroy Dec 5, 2025
3e24267
Refactor empty check to use is_empty()
richiemcilroy Dec 5, 2025
13986b5
Add recent items submenu to tray and improve image handling
richiemcilroy Dec 7, 2025
d2df462
Remove background overlay from target select screen
richiemcilroy Dec 7, 2025
cfd360e
clippy
richiemcilroy Dec 7, 2025
75c3a68
Document Rust Clippy workspace lint rules
richiemcilroy Dec 7, 2025
32401db
Fix Unicode truncation and fallback for file creation time
richiemcilroy Dec 7, 2025
1de769f
Refactor error handling with let-else chains
richiemcilroy Dec 7, 2025
187bc33
clippy
richiemcilroy Dec 7, 2025
6edcee7
clippy
richiemcilroy Dec 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ jobs:
settings:
- target: aarch64-apple-darwin
runner: macos-latest
# Windows can't take the disk usage lol
# - target: x86_64-pc-windows-msvc
# runner: windows-latest
- target: x86_64-pc-windows-msvc
runner: windows-latest
runs-on: ${{ matrix.settings.runner }}
permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
"recommendations": ["biomejs.biome", "rust-lang.rust-analyzer"]
}
2 changes: 1 addition & 1 deletion apps/desktop/src-tauri/src/audio_meter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,6 @@ fn samples_to_f64(samples: &MicrophoneSamples) -> impl Iterator<Item = f64> + us
SampleFormat::F64 => f64::from_ne_bytes([
data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7],
]),
_ => todo!(),
_ => 0.0,
})
}
6 changes: 3 additions & 3 deletions apps/desktop/src-tauri/src/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ pub enum CameraPreviewShape {

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Type)]
pub struct CameraPreviewState {
size: f32,
shape: CameraPreviewShape,
mirrored: bool,
pub size: f32,
pub shape: CameraPreviewShape,
pub mirrored: bool,
}

impl Default for CameraPreviewState {
Expand Down
27 changes: 23 additions & 4 deletions apps/desktop/src-tauri/src/recording.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ use cap_fail::fail;
use cap_project::CursorMoveEvent;
use cap_project::cursor::SHORT_CURSOR_SHAPE_DEBOUNCE_MS;
use cap_project::{
CursorClickEvent, InstantRecordingMeta, MultipleSegments, Platform, ProjectConfiguration,
RecordingMeta, RecordingMetaInner, SharingMeta, StudioRecordingMeta, StudioRecordingStatus,
TimelineConfiguration, TimelineSegment, UploadMeta, ZoomMode, ZoomSegment,
cursor::CursorEvents,
CameraShape, CursorClickEvent, InstantRecordingMeta, MultipleSegments, Platform,
ProjectConfiguration, RecordingMeta, RecordingMetaInner, SharingMeta, StudioRecordingMeta,
StudioRecordingStatus, TimelineConfiguration, TimelineSegment, UploadMeta, ZoomMode,
ZoomSegment, cursor::CursorEvents,
};
use cap_recording::feeds::camera::CameraFeedLock;
#[cfg(target_os = "macos")]
Expand Down Expand Up @@ -42,6 +42,7 @@ use tauri_plugin_dialog::{DialogExt, MessageDialogBuilder};
use tauri_specta::Event;
use tracing::*;

use crate::camera::{CameraPreviewManager, CameraPreviewShape};
use crate::web_api::AuthedApiError;
use crate::{
App, CurrentRecordingChanged, MutableState, NewStudioRecordingAdded, RecordingState,
Expand Down Expand Up @@ -1680,6 +1681,24 @@ fn project_config_from_recording(

let mut config = default_config.unwrap_or_default();

let camera_preview_manager = CameraPreviewManager::new(app);
if let Ok(camera_preview_state) = camera_preview_manager.get_state() {
match camera_preview_state.shape {
CameraPreviewShape::Round => {
config.camera.shape = CameraShape::Square;
config.camera.rounding = 100.0;
}
CameraPreviewShape::Square => {
config.camera.shape = CameraShape::Square;
config.camera.rounding = 25.0;
}
CameraPreviewShape::Full => {
config.camera.shape = CameraShape::Source;
config.camera.rounding = 25.0;
}
}
}

let timeline_segments = recordings
.segments
.iter()
Expand Down
4 changes: 4 additions & 0 deletions apps/desktop/src-tauri/src/screenshot_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pub struct ScreenshotEditorInstance {
pub ws_shutdown_token: CancellationToken,
pub config_tx: watch::Sender<ProjectConfiguration>,
pub path: PathBuf,
pub pretty_name: String,
}

impl ScreenshotEditorInstance {
Expand Down Expand Up @@ -264,6 +265,7 @@ impl ScreenshotEditorInstances {
ws_shutdown_token,
config_tx,
path: path.clone(),
pretty_name: recording_meta.pretty_name.clone(),
});

// Spawn render loop
Expand Down Expand Up @@ -375,6 +377,7 @@ pub struct SerializedScreenshotEditorInstance {
pub frames_socket_url: String,
pub path: PathBuf,
pub config: Option<ProjectConfiguration>,
pub pretty_name: String,
}

#[tauri::command]
Expand Down Expand Up @@ -404,6 +407,7 @@ pub async fn create_screenshot_editor_instance(
frames_socket_url: format!("ws://localhost:{}", instance.ws_port),
path: instance.path.clone(),
config: Some(config),
pretty_name: instance.pretty_name.clone(),
})
}

Expand Down
4 changes: 3 additions & 1 deletion apps/desktop/src-tauri/src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function ViewAllButton(props: { onClick: () => void; label: string }) {
<button
type="button"
onClick={props.onClick}
class="col-span-2 flex items-center justify-center gap-2 py-2.5 mt-1 text-xs font-medium text-gray-11 bg-gray-3 rounded-lg hover:bg-gray-4 hover:text-gray-12 transition-colors"
class="col-span-2 flex items-center justify-center gap-2 py-2.5 mt-1 mb-3 text-xs font-medium text-gray-11 bg-gray-3 rounded-lg hover:bg-gray-4 hover:text-gray-12 transition-colors"
>
<IconLucideExternalLink class="size-3" />
{props.label}
Expand Down
1 change: 0 additions & 1 deletion apps/desktop/src/routes/editor/Player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,6 @@ function PreviewCanvas() {
height: `${size().height}px`,
...gridStyle,
}}
class="rounded"
ref={canvasRef}
id="canvas"
width={frameWidth()}
Expand Down
12 changes: 7 additions & 5 deletions apps/desktop/src/routes/in-progress-recording.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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" />
Expand All @@ -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"
Expand Down
Loading
Loading