Skip to content

Commit

Permalink
fix windows bug
Browse files Browse the repository at this point in the history
  • Loading branch information
0-don committed Dec 25, 2024
1 parent 9e1509a commit 42fae19
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
28 changes: 12 additions & 16 deletions src-tauri/src/service/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,20 @@ use tauri_plugin_positioner::{Position, WindowExt};

/// App
pub fn init_window() {
tauri::async_runtime::spawn(async {
let size = calculate_logical_size(MAIN_WINDOW_X, MAIN_WINDOW_Y).await;
#[cfg(any(windows, target_os = "macos"))]
{
get_main_window()
.set_size(size)
.expect("Failed to set window size");

#[cfg(any(windows, target_os = "macos"))]
{
let _ = get_main_window().set_decorations(false);
let _ = get_main_window().set_shadow(true);
}
.set_decorations(false)
.expect("Failed to set decorations");
get_main_window()
.set_shadow(false)
.expect("Failed to set shadow");
}

#[cfg(debug_assertions)]
{
get_main_window().open_devtools();
}
});
#[cfg(debug_assertions)]
{
get_main_window().open_devtools();
}
}

pub fn toggle_main_window() {
Expand Down Expand Up @@ -72,7 +69,6 @@ pub fn toggle_main_window() {
)
.expect("Failed to emit change tab event");
get_main_window().show().expect("Failed to show window");

register_hotkeys(true);
get_main_window()
.emit(
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/app/clipboard/text-clipboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const TextClipboard: Component<TextClipboardProps> = (props) => {
<ClipboardHeader {...props} Icon={getIcon()} />

<div class="min-w-0 flex-1">
<p class="w-[calc(100vw-6.5rem)] truncate text-left text-sm">{data}</p>
<p class="w-[calc(100vw-6.576rem)] truncate text-left text-sm">{data}</p>
<div
class="text-left text-xs font-thin text-zinc-700 dark:text-zinc-300"
title={new Date(props.data.clipboard.created_date).toLocaleString()}
Expand Down

0 comments on commit 42fae19

Please sign in to comment.