mirror of https://github.com/logseq/logseq
improve(electron): polish toolbar ui
parent
ea66b25a5a
commit
76de88104e
|
@ -21,7 +21,7 @@
|
||||||
[]
|
[]
|
||||||
(let [win-opts {:width 980
|
(let [win-opts {:width 980
|
||||||
:height 700
|
:height 700
|
||||||
:frame false
|
:frame win32?
|
||||||
:titleBarStyle (if mac? "hidden" nil)
|
:titleBarStyle (if mac? "hidden" nil)
|
||||||
:webPreferences
|
:webPreferences
|
||||||
{:nodeIntegration false
|
{:nodeIntegration false
|
||||||
|
|
|
@ -151,6 +151,7 @@
|
||||||
(remove #(= (:url %) config/local-repo)))]
|
(remove #(= (:url %) config/local-repo)))]
|
||||||
(rum/with-context [[t] i18n/*tongue-context*]
|
(rum/with-context [[t] i18n/*tongue-context*]
|
||||||
[:div.cp__header#head
|
[:div.cp__header#head
|
||||||
|
{:on-double-click #(when (util/electron?) (js/window.apis.toggleMaxOrMinActiveWindow))}
|
||||||
(left-menu-button {:on-click (fn []
|
(left-menu-button {:on-click (fn []
|
||||||
(open-fn)
|
(open-fn)
|
||||||
(state/set-left-sidebar-open! true))})
|
(state/set-left-sidebar-open! true))})
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cp__header-left-menu {
|
.cp__header-left-menu {
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.cp__sidebar-main-content {
|
.cp__sidebar-main-content {
|
||||||
padding: 6rem 1.5rem;
|
padding: 5rem 1.5rem;
|
||||||
max-width: var(--ls-main-content-max-width);
|
max-width: var(--ls-main-content-max-width);
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
|
@ -95,13 +95,12 @@ html[data-theme=light] {
|
||||||
html.is-electron {
|
html.is-electron {
|
||||||
--frame-top-height: 24px;
|
--frame-top-height: 24px;
|
||||||
|
|
||||||
.theme-inner {
|
.theme-inner {}
|
||||||
padding-top: var(--frame-top-height);
|
|
||||||
}
|
|
||||||
|
|
||||||
.cp__header {
|
.cp__header {
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
top: var(--frame-top-height);
|
padding-top: var(--frame-top-height);
|
||||||
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cp__right-sidebar {
|
.cp__right-sidebar {
|
||||||
|
@ -109,11 +108,30 @@ html.is-electron {
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-mac {
|
&.is-mac {
|
||||||
.ls-window-frame-title-bar {
|
.cp__header {
|
||||||
padding-left: 70px;
|
padding-top: calc(var(--frame-top-height) + 12px);
|
||||||
|
|
||||||
|
&-logo {
|
||||||
|
height: var(--frame-top-height);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: " ";
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 8;
|
||||||
|
-webkit-app-region: drag;
|
||||||
|
width: 100%;
|
||||||
|
height: var(--frame-top-height);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#search {
|
||||||
|
-webkit-app-region: drag;
|
||||||
|
}
|
||||||
|
|
||||||
.ls-window-frame-title-bar {
|
.ls-window-frame-title-bar {
|
||||||
background-color: var(--ls-primary-background-color);
|
background-color: var(--ls-primary-background-color);
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
Loading…
Reference in New Issue