use a new approach to enable header resizable

This commit is contained in:
Xen 2020-06-27 11:47:58 +08:00
parent 27697aec10
commit d19ab3de06
2 changed files with 16 additions and 3 deletions

View File

@ -6,7 +6,7 @@
--bar-height: 53px;
--trans-btn-height: 20px;
--modem-btn-height: 10px;
--body-border-widht: 0pt;
--body-border-widht: 0px;
--bar-color-head: #fafafa;
--bar-color-middle: #fafafa;
--bar-color-tail: #fafafa;
@ -26,7 +26,6 @@ html {
body {
position: fixed;
border: var(--body-border-widht) solid #26a69a;
margin-top: calc(1px - var(--body-border-widht));
height: 100%;
width: 100%;
background-color: #fafafa;
@ -37,12 +36,25 @@ body {
}
nav {
-webkit-app-region: drag;
/* -webkit-app-region: drag; */
background-color: #fafafa;
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 {
margin-top: 14px;
margin-bottom: 6px;

View File

@ -11,6 +11,7 @@
<body>
<nav class="z-depth-0" id="nav-area">
<div class="titlebar-drag-region"></div>
<div class="nav-wrapper" id="header">
<i class="material-icons left" id="logo">vpn_key</i>