Skip to content

Commit 15e9441

Browse files
committed
fix merge conflicts
1 parent ce31fdc commit 15e9441

File tree

2 files changed

+45
-51
lines changed

2 files changed

+45
-51
lines changed

src-tauri/src/lib.rs

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -211,30 +211,29 @@ pub fn run() {
211211
// when the variable is unset
212212
let console_filter = build_console_filter();
213213

214-
let mut builder = tauri::Builder::default()
215-
.plugin(
216-
LogBuilder::new()
217-
.level(log::LevelFilter::Trace) // Set to most verbose level globally
218-
.max_file_size(500_000)
219-
.rotation_strategy(RotationStrategy::KeepOne)
220-
.clear_targets()
221-
.targets([
222-
// Console output respects RUST_LOG environment variable
223-
Target::new(TargetKind::Stdout).filter({
224-
let console_filter = console_filter.clone();
225-
move |metadata| console_filter.enabled(metadata)
226-
}),
227-
// File logs respect the user's settings (stored in FILE_LOG_LEVEL atomic)
228-
Target::new(TargetKind::LogDir {
229-
file_name: Some("handy".into()),
230-
})
231-
.filter(|metadata| {
232-
let file_level = FILE_LOG_LEVEL.load(Ordering::Relaxed);
233-
metadata.level() <= level_filter_from_u8(file_level)
234-
}),
235-
])
236-
.build(),
237-
);
214+
let mut builder = tauri::Builder::default().plugin(
215+
LogBuilder::new()
216+
.level(log::LevelFilter::Trace) // Set to most verbose level globally
217+
.max_file_size(500_000)
218+
.rotation_strategy(RotationStrategy::KeepOne)
219+
.clear_targets()
220+
.targets([
221+
// Console output respects RUST_LOG environment variable
222+
Target::new(TargetKind::Stdout).filter({
223+
let console_filter = console_filter.clone();
224+
move |metadata| console_filter.enabled(metadata)
225+
}),
226+
// File logs respect the user's settings (stored in FILE_LOG_LEVEL atomic)
227+
Target::new(TargetKind::LogDir {
228+
file_name: Some("handy".into()),
229+
})
230+
.filter(|metadata| {
231+
let file_level = FILE_LOG_LEVEL.load(Ordering::Relaxed);
232+
metadata.level() <= level_filter_from_u8(file_level)
233+
}),
234+
])
235+
.build(),
236+
);
238237

239238
#[cfg(target_os = "macos")]
240239
{

src-tauri/src/overlay.rs

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -146,32 +146,26 @@ pub fn create_recording_overlay(app_handle: &AppHandle) {
146146
if let Some((x, y)) = calculate_overlay_position(app_handle) {
147147
// PanelBuilder creates a Tauri window then converts it to NSPanel.
148148
// The window remains registered, so get_webview_window() still works.
149-
match PanelBuilder::<_, RecordingOverlayPanel>::new(
150-
app_handle,
151-
"recording_overlay"
152-
)
153-
.url(WebviewUrl::App("src/overlay/index.html".into()))
154-
.title("Recording")
155-
.position(tauri::Position::Logical(tauri::LogicalPosition { x, y }))
156-
.level(PanelLevel::Status)
157-
.size(tauri::Size::Logical(tauri::LogicalSize {
158-
width: OVERLAY_WIDTH,
159-
height: OVERLAY_HEIGHT
160-
}))
161-
.has_shadow(false)
162-
.transparent(true)
163-
.no_activate(true)
164-
.corner_radius(0.0)
165-
.with_window(|w| {
166-
w.decorations(false)
167-
.transparent(true)
168-
})
169-
.collection_behavior(
170-
CollectionBehavior::new()
171-
.can_join_all_spaces()
172-
.full_screen_auxiliary()
173-
)
174-
.build()
149+
match PanelBuilder::<_, RecordingOverlayPanel>::new(app_handle, "recording_overlay")
150+
.url(WebviewUrl::App("src/overlay/index.html".into()))
151+
.title("Recording")
152+
.position(tauri::Position::Logical(tauri::LogicalPosition { x, y }))
153+
.level(PanelLevel::Status)
154+
.size(tauri::Size::Logical(tauri::LogicalSize {
155+
width: OVERLAY_WIDTH,
156+
height: OVERLAY_HEIGHT,
157+
}))
158+
.has_shadow(false)
159+
.transparent(true)
160+
.no_activate(true)
161+
.corner_radius(0.0)
162+
.with_window(|w| w.decorations(false).transparent(true))
163+
.collection_behavior(
164+
CollectionBehavior::new()
165+
.can_join_all_spaces()
166+
.full_screen_auxiliary(),
167+
)
168+
.build()
175169
{
176170
Ok(panel) => {
177171
let _ = panel.hide();
@@ -194,7 +188,8 @@ pub fn show_recording_overlay(app_handle: &AppHandle) {
194188
if let Some(overlay_window) = app_handle.get_webview_window("recording_overlay") {
195189
// Update position before showing to prevent flicker from position changes
196190
if let Some((x, y)) = calculate_overlay_position(app_handle) {
197-
let _ = overlay_window.set_position(tauri::Position::Logical(tauri::LogicalPosition { x, y }));
191+
let _ = overlay_window
192+
.set_position(tauri::Position::Logical(tauri::LogicalPosition { x, y }));
198193
}
199194

200195
let _ = overlay_window.show();

0 commit comments

Comments
 (0)