mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 03:32:36 +08:00
feat: Add border-radius for window on linux
This commit is contained in:
parent
4256590735
commit
75d41b6fe5
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@ dist-ssr
|
||||||
update.json
|
update.json
|
||||||
scripts/_env.sh
|
scripts/_env.sh
|
||||||
.vscode
|
.vscode
|
||||||
|
.tool-version
|
1
.tool-versions
Normal file
1
.tool-versions
Normal file
|
@ -0,0 +1 @@
|
||||||
|
nodejs 21.7.1
|
|
@ -171,7 +171,7 @@ pub fn create_window(app_handle: &AppHandle) {
|
||||||
.title_bar_style(tauri::TitleBarStyle::Overlay)
|
.title_bar_style(tauri::TitleBarStyle::Overlay)
|
||||||
.build();
|
.build();
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
let window = builder.decorations(true).transparent(false).build();
|
let window = builder.decorations(false).transparent(true).build();
|
||||||
|
|
||||||
match window {
|
match window {
|
||||||
Ok(win) => {
|
Ok(win) => {
|
||||||
|
|
|
@ -47,11 +47,11 @@ body {
|
||||||
@import "./page.scss";
|
@import "./page.scss";
|
||||||
@import "./font.scss";
|
@import "./font.scss";
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
// @media (prefers-color-scheme: dark) {
|
||||||
:root {
|
// :root {
|
||||||
background-color: rgba(18, 18, 18, 1);
|
// background-color: rgba(18, 18, 18, 1);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
.user-none {
|
.user-none {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// top: 0px;
|
// top: 0px;
|
||||||
// right: 0px;
|
// right: 0px;
|
||||||
height: 24px;
|
height: 36px;
|
||||||
display: flex;
|
display: flex;
|
||||||
// align-items: center;
|
// align-items: center;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
|
|
|
@ -122,6 +122,14 @@ const Layout = () => {
|
||||||
({ palette }) => ({
|
({ palette }) => ({
|
||||||
bgcolor: palette.background.paper,
|
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">
|
<div className="layout__left" data-tauri-drag-region="true">
|
||||||
|
@ -148,11 +156,11 @@ const Layout = () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="layout__right">
|
<div className="layout__right">
|
||||||
{OS === "windows" && (
|
{
|
||||||
<div className="the-bar" data-tauri-drag-region="true">
|
<div className="the-bar" data-tauri-drag-region="true">
|
||||||
<LayoutControl />
|
{OS !== "macos" && <LayoutControl />}
|
||||||
</div>
|
</div>
|
||||||
)}
|
}
|
||||||
|
|
||||||
<TransitionGroup className="the-content">
|
<TransitionGroup className="the-content">
|
||||||
<CSSTransition
|
<CSSTransition
|
||||||
|
|
|
@ -4,7 +4,7 @@ const OS = getSystem();
|
||||||
// default theme setting
|
// default theme setting
|
||||||
export const defaultTheme = {
|
export const defaultTheme = {
|
||||||
primary_color: "#007AFF",
|
primary_color: "#007AFF",
|
||||||
secondary_color: "#FFCC00",
|
secondary_color: "#fc9b76",
|
||||||
primary_text: "#000000",
|
primary_text: "#000000",
|
||||||
secondary_text: "#3c3c4399",
|
secondary_text: "#3c3c4399",
|
||||||
info_color: "#007AFF",
|
info_color: "#007AFF",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user