Skip to content

Commit 2065ccf

Browse files
committed
Fix compilation errors
1 parent 0a9cbf3 commit 2065ccf

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

src-tauri/src/commands.rs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ fn file_icon_to_response(icon: file_icon_provider::Icon) -> FileIconResponse {
338338
/// Returns base64 encoded RGBA pixel data with dimensions
339339
#[tauri::command]
340340
pub async fn get_file_icon(
341-
app: AppHandle,
341+
_app: AppHandle,
342342
path: String,
343343
size: Option<u16>,
344344
) -> CommandResult<FileIconResponse> {
@@ -496,9 +496,7 @@ fn show_main_window_at_position(app: &AppHandle, position: Position) {
496496
// Transparent webviews render differently across GTK/WebKit and AppKit; on
497497
// non-Windows this produced unreadable shadows/ghosting. Use an opaque
498498
// white background there and keep Windows transparency for Mica/Acrylic.
499-
let builder = builder
500-
.transparent(false)
501-
.background_color(Color(255, 255, 255, 255));
499+
let builder = builder.background_color(Color(255, 255, 255, 255));
502500

503501
let Some(builder) = apply_default_window_icon(builder, app, "main_popup") else {
504502
return;
@@ -609,15 +607,10 @@ fn show_drive_window_internal(app: &AppHandle, title: &str, url_path: &str) {
609607
.decorations(false)
610608
.minimizable(false);
611609

612-
#[cfg(windows)]
613-
let builder = builder.transparent(true).effects(effects);
614-
615610
#[cfg(not(windows))]
616611
// See `show_main_window_at_position`: keep non-Windows webviews opaque to
617612
// avoid platform compositor artifacts while preserving Windows effects.
618-
let builder = builder
619-
.transparent(false)
620-
.background_color(Color(255, 255, 255, 255));
613+
let builder = builder.background_color(Color(255, 255, 255, 255));
621614

622615
// Platform-specific: title_bar_style and hidden_title are macOS-only
623616
#[cfg(target_os = "macos")]
@@ -631,6 +624,11 @@ fn show_drive_window_internal(app: &AppHandle, title: &str, url_path: &str) {
631624

632625
match builder.build() {
633626
Ok(window) => {
627+
#[cfg(windows)]
628+
{
629+
let _ = window.set_transparent(true);
630+
let _ = window.set_effects(effects);
631+
}
634632
move_window_safely(&window, Position::Center, "add-drive");
635633
let _ = window.create_overlay_titlebar();
636634
let _ = window.show();
@@ -675,9 +673,7 @@ pub fn show_settings_window_impl(app: &AppHandle) {
675673
#[cfg(not(windows))]
676674
// See `show_main_window_at_position`: keep non-Windows webviews opaque to
677675
// avoid platform compositor artifacts while preserving Windows effects.
678-
let builder = builder
679-
.transparent(false)
680-
.background_color(Color(255, 255, 255, 255));
676+
let builder = builder.background_color(Color(255, 255, 255, 255));
681677

682678
// Platform-specific: title_bar_style and hidden_title are macOS-only
683679
#[cfg(target_os = "macos")]
@@ -691,6 +687,11 @@ pub fn show_settings_window_impl(app: &AppHandle) {
691687

692688
match builder.build() {
693689
Ok(window) => {
690+
#[cfg(windows)]
691+
{
692+
let _ = window.set_transparent(true);
693+
let _ = window.set_effects(effects);
694+
}
694695
move_window_safely(&window, Position::Center, "settings");
695696
let _ = window.create_overlay_titlebar();
696697
let _ = window.show();

0 commit comments

Comments
 (0)