Skip to content

Commit

Permalink
fix window sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendonovich committed Nov 27, 2024
1 parent e8e993b commit 8b1fb7f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/desktop/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,7 @@ pub async fn run() {
CapWindowId::WindowCaptureOccluder.label().as_str(),
CapWindowId::Camera.label().as_str(),
CapWindowId::PrevRecordings.label().as_str(),
CapWindowId::InProgressRecording.label().as_str(),
])
.map_label(|label| match label {
label if label.starts_with("editor-") => "editor",
Expand Down Expand Up @@ -1833,7 +1834,6 @@ pub async fn run() {
let permissions = permissions::do_permissions_check(false);
println!("Permissions check result: {:?}", permissions);

ShowCapWindow::Setup.show(&app).ok();
if !permissions.screen_recording.permitted()
|| !permissions.accessibility.permitted()
|| GeneralSettingsStore::get(&app)
Expand Down
6 changes: 5 additions & 1 deletion apps/desktop/src-tauri/src/windows.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![allow(unused_mut)]

use crate::fake_window;
use cap_flags::FLAGS;
use serde::Deserialize;
use specta::Type;
use std::{path::PathBuf, str::FromStr};
Expand Down Expand Up @@ -238,7 +239,10 @@ impl ShowCapWindow {
Self::InProgressRecording {
position: _position,
} => {
let width = 200.0;
let mut width = 180.0;
if FLAGS.pause_resume {
width += 32.0;
}
let height = 40.0;

self.window_builder(app, "/in-progress-recording")
Expand Down
4 changes: 2 additions & 2 deletions crates/flags/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ pub struct Flags {
pub const FLAGS: Flags = Flags {
record_mouse: false, // cfg!(debug_assertions),
split: false, // cfg!(debug_assertions),
pause_resume: cfg!(debug_assertions),
zoom: false, // cfg!(debug_assertions),
pause_resume: false, // cfg!(debug_assertions),
zoom: false, // cfg!(debug_assertions),
};

1 comment on commit 8b1fb7f

@vercel
Copy link

@vercel vercel bot commented on 8b1fb7f Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.