Skip to content

Commit

Permalink
Additional improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sotch-pr35mac committed Apr 29, 2024
1 parent 342867d commit 15e6e00
Show file tree
Hide file tree
Showing 9 changed files with 400 additions and 482 deletions.
830 changes: 377 additions & 453 deletions src/native/Cargo.lock

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions src/native/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ fn main() {

#[cfg(target_os = "macos")]
{
// main_window.set_transparent_titlebar(ToolbarThickness::Thick);
// character_window.set_transparent_titlebar(ToolbarThickness::Medium);
character_window.set_transparent_titlebar(ToolbarThickness::Medium);
main_window
.lock()
.unwrap()
Expand All @@ -166,13 +165,12 @@ fn main() {
main_window.lock().unwrap().on_window_event(move |event| {
match event {
WindowEvent::CloseRequested { .. } => {
/* TODO(macos): When the app icon is clicked from the dock, open the main window.
* Currently, Tuair doesn't offer a way to capture dock click events, so
* for now we'll just clcose the application when the main window is
* closed, like we do for other platforms.
/* TODO(macos): When the app icon is clicked from the dock, open the main
* window. Currently, Tauri doesn't offer a way to capture dock click
* events, so for now we'll just clcose the application when the main
* window is closed, like we do for other platforms.
*/

// When the main window is closed, emit an exit event.
handle.exit(0);
}
WindowEvent::Resized { .. } => {
Expand Down
4 changes: 4 additions & 0 deletions src/native/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
"fullscreen": false,
"height": 655,
"width": 1110,
"minHeight": 567,
"minWidth": 567,
"resizable": true,
"title": "Syng",
"url": "index.html",
Expand All @@ -81,6 +83,8 @@
"fullscreen": false,
"height": 497,
"width": 886,
"minHeight": 497,
"minWidth": 886,
"resizable": true,
"title": "Syng | Characters",
"visible": false,
Expand Down
7 changes: 6 additions & 1 deletion src/views/characters.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
<link rel="stylesheet" href="templates/styles/syui.css">
<link rel="stylesheet" href="templates/build/bundle.css">
<script defer src="templates/build/bundle.js"></script>
<style>
.body {
overlfow: hidden;
}
</style>
</head>
<body id="characters">
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions src/views/templates/build/bundle.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/views/templates/build/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/views/templates/build/bundle.js.map

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions src/views/templates/components/Navigation/Navigation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,6 @@
// On macOS, listen for fullscreen to adjust navigation when traffic lights disappear.
$: if (isMacos) {
// window.__TAURI__.window.appWindow.onResized().then(() => {
// // The app window was resized. Let's check if the screen is maximized.
// window.__TAURI__.window.appWindow.isMaximized().then(fullscreen => {
// if (fullscreen) {
// console.log("The app is fullscreen");
// } else {
// console.log("The app is not fullscreen");
// }
// });
// });
window.__TAURI__.window.appWindow.onResized(() => {
window.__TAURI__.window.appWindow.isFullscreen().then(fullscreen => {
if (fullscreen) {
Expand All @@ -93,12 +83,6 @@
trafficLightMargin = true;
}
});
}).then(unlisten => {
console.log("We got unlisten back");
console.log(unlisten);
}).catch(e => {
console.log('There was an error doing this whole thing. Error = ');
console.log(e);
});
}
Expand Down
5 changes: 4 additions & 1 deletion src/views/templates/styles/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,7 @@ body {
font-family: var(--sy-font-family);
color: var(--sy-color--black);
margin: 0;
}
overflow: hidden;
user-select: none;
cursor: default;
}

0 comments on commit 15e6e00

Please sign in to comment.