mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-29 20:32:44 +08:00
调整对话框样式,linux下使用win32样式
This commit is contained in:
parent
de441e4e6d
commit
1a95259aef
@ -12,7 +12,8 @@ const createDialog = (config, customDialogOptions = {}) => {
|
|||||||
const dialogPath = "lib/dialog/view.html";
|
const dialogPath = "lib/dialog/view.html";
|
||||||
const preloadPath = "lib/dialog/controller.js";
|
const preloadPath = "lib/dialog/controller.js";
|
||||||
|
|
||||||
const platform = os.platform();
|
// linux 和 win32 都使用 win32 的样式
|
||||||
|
const platform = os.platform() === "darwin" ? "darwin" : "win32";
|
||||||
|
|
||||||
const dialogWidth =
|
const dialogWidth =
|
||||||
config.type === "textarea" || config.type === "select"
|
config.type === "textarea" || config.type === "select"
|
||||||
|
@ -114,21 +114,18 @@ body {
|
|||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.platform-darwin .title-left,
|
.platform-darwin .title-left {
|
||||||
.platform-linux .title-left {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center
|
justify-content: center
|
||||||
}
|
}
|
||||||
|
|
||||||
/* macOS 和 Linux 样式 */
|
/* macOS 样式 */
|
||||||
.platform-darwin .title-bar,
|
.platform-darwin .title-bar {
|
||||||
.platform-linux .title-bar {
|
|
||||||
border-bottom: 1px solid var(--border-color);
|
border-bottom: 1px solid var(--border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.platform-darwin .close-btn,
|
.platform-darwin .close-btn {
|
||||||
.platform-linux .close-btn {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 8px;
|
left: 8px;
|
||||||
top: 7px;
|
top: 7px;
|
||||||
@ -145,9 +142,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.platform-darwin .close-btn::before,
|
.platform-darwin .close-btn::before,
|
||||||
.platform-darwin .close-btn::after,
|
.platform-darwin .close-btn::after {
|
||||||
.platform-linux .close-btn::before,
|
|
||||||
.platform-linux .close-btn::after {
|
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 8px;
|
width: 8px;
|
||||||
@ -158,25 +153,20 @@ body {
|
|||||||
transition: opacity 0.2s;
|
transition: opacity 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.platform-darwin .close-btn::before,
|
.platform-darwin .close-btn::before {
|
||||||
.platform-linux .close-btn::before {
|
|
||||||
transform: rotate(45deg);
|
transform: rotate(45deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.platform-darwin .close-btn::after,
|
.platform-darwin .close-btn::after {
|
||||||
.platform-linux .close-btn::after {
|
|
||||||
transform: rotate(-45deg);
|
transform: rotate(-45deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.platform-darwin .close-btn:hover,
|
.platform-darwin .close-btn:hover {
|
||||||
.platform-linux .close-btn:hover {
|
|
||||||
background-color: var(--mac-close-btn);
|
background-color: var(--mac-close-btn);
|
||||||
}
|
}
|
||||||
|
|
||||||
.platform-darwin .close-btn:hover::before,
|
.platform-darwin .close-btn:hover::before,
|
||||||
.platform-darwin .close-btn:hover::after,
|
.platform-darwin .close-btn:hover::after {
|
||||||
.platform-linux .close-btn:hover::before,
|
|
||||||
.platform-linux .close-btn:hover::after {
|
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user