Skip to content

Commit

Permalink
feat: Add border-radius for window on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
MystiPanda committed Mar 13, 2024
1 parent 4256590 commit 75d41b6
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ dist-ssr
update.json
scripts/_env.sh
.vscode
.tool-version
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 21.7.1
2 changes: 1 addition & 1 deletion src-tauri/src/utils/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub fn create_window(app_handle: &AppHandle) {
.title_bar_style(tauri::TitleBarStyle::Overlay)
.build();
#[cfg(target_os = "linux")]
let window = builder.decorations(true).transparent(false).build();
let window = builder.decorations(false).transparent(true).build();

match window {
Ok(win) => {
Expand Down
10 changes: 5 additions & 5 deletions src/assets/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ body {
@import "./page.scss";
@import "./font.scss";

@media (prefers-color-scheme: dark) {
:root {
background-color: rgba(18, 18, 18, 1);
}
}
// @media (prefers-color-scheme: dark) {
// :root {
// background-color: rgba(18, 18, 18, 1);
// }
// }

.user-none {
user-select: none;
Expand Down
2 changes: 1 addition & 1 deletion src/assets/styles/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
// position: absolute;
// top: 0px;
// right: 0px;
height: 24px;
height: 36px;
display: flex;
// align-items: center;
justify-content: end;
Expand Down
14 changes: 11 additions & 3 deletions src/pages/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ const Layout = () => {
({ palette }) => ({
bgcolor: palette.background.paper,
}),
OS === "linux"
? {
borderRadius: "8px",
border: "2px solid var(--divider-color)",
width: "calc(100vw - 4px)",
height: "calc(100vh - 4px)",
}
: {},
]}
>
<div className="layout__left" data-tauri-drag-region="true">
Expand All @@ -148,11 +156,11 @@ const Layout = () => {
</div>

<div className="layout__right">
{OS === "windows" && (
{
<div className="the-bar" data-tauri-drag-region="true">
<LayoutControl />
{OS !== "macos" && <LayoutControl />}
</div>
)}
}

<TransitionGroup className="the-content">
<CSSTransition
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const OS = getSystem();
// default theme setting
export const defaultTheme = {
primary_color: "#007AFF",
secondary_color: "#FFCC00",
secondary_color: "#fc9b76",
primary_text: "#000000",
secondary_text: "#3c3c4399",
info_color: "#007AFF",
Expand Down

0 comments on commit 75d41b6

Please sign in to comment.