use a new approach to enable header resizable
This commit is contained in:
parent
27697aec10
commit
d19ab3de06
|
@ -6,7 +6,7 @@
|
||||||
--bar-height: 53px;
|
--bar-height: 53px;
|
||||||
--trans-btn-height: 20px;
|
--trans-btn-height: 20px;
|
||||||
--modem-btn-height: 10px;
|
--modem-btn-height: 10px;
|
||||||
--body-border-widht: 0pt;
|
--body-border-widht: 0px;
|
||||||
--bar-color-head: #fafafa;
|
--bar-color-head: #fafafa;
|
||||||
--bar-color-middle: #fafafa;
|
--bar-color-middle: #fafafa;
|
||||||
--bar-color-tail: #fafafa;
|
--bar-color-tail: #fafafa;
|
||||||
|
@ -26,7 +26,6 @@ html {
|
||||||
body {
|
body {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
border: var(--body-border-widht) solid #26a69a;
|
border: var(--body-border-widht) solid #26a69a;
|
||||||
margin-top: calc(1px - var(--body-border-widht));
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
|
@ -37,12 +36,25 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
-webkit-app-region: drag;
|
/* -webkit-app-region: drag; */
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* refer: https://github.com/electron/electron/issues/3022#issuecomment-543146976 */
|
||||||
|
.titlebar-drag-region {
|
||||||
|
/*added*/
|
||||||
|
top: 6px;
|
||||||
|
left: 6px;
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
width: calc(100% - 12px);
|
||||||
|
height: calc(100% - 6px);
|
||||||
|
z-index: -1;
|
||||||
|
-webkit-app-region: drag;
|
||||||
|
}
|
||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
margin-top: 14px;
|
margin-top: 14px;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<nav class="z-depth-0" id="nav-area">
|
<nav class="z-depth-0" id="nav-area">
|
||||||
|
<div class="titlebar-drag-region"></div>
|
||||||
<div class="nav-wrapper" id="header">
|
<div class="nav-wrapper" id="header">
|
||||||
<i class="material-icons left" id="logo">vpn_key</i>
|
<i class="material-icons left" id="logo">vpn_key</i>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue