mirror of https://github.com/logseq/logseq
fix(iPad): weird status bar height when splitting screen
parent
59d9fac5db
commit
1b9cecd180
|
@ -173,8 +173,11 @@ a.button {
|
|||
cursor: default !important;
|
||||
}
|
||||
|
||||
html.is-native-ios,
|
||||
html.is-native-ipad,
|
||||
html.is-ios.is-safari {
|
||||
--ls-headbar-inner-top-padding: 0px;
|
||||
--ls-headbar-height: 4rem;
|
||||
|
||||
#main-container {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
@ -189,7 +192,7 @@ html.is-ios.is-safari {
|
|||
}
|
||||
}
|
||||
|
||||
html.is-ios {
|
||||
html.is-native-iphone {
|
||||
--ls-headbar-inner-top-padding: 36px;
|
||||
|
||||
.cp__header > .r {
|
||||
|
@ -197,9 +200,7 @@ html.is-ios {
|
|||
}
|
||||
|
||||
@screen sm {
|
||||
--ls-headbar-inner-top-padding: 0px;
|
||||
--ls-headbar-height: 4rem;
|
||||
|
||||
|
||||
.cp__header {
|
||||
background-color: transparent !important;
|
||||
display: flex;
|
||||
|
@ -244,4 +245,4 @@ html.is-ios {
|
|||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,11 +69,12 @@
|
|||
:iPhoneSE4 {:width 320 :height 568 :statusbar 20}
|
||||
:iPodtouch5 {:width 320 :height 568 :statusbar 20}}))
|
||||
|
||||
|
||||
(defn get-idevice-model
|
||||
[]
|
||||
(when (native-ios?)
|
||||
(let [width (.-innerWidth js/window)
|
||||
height (.-innerHeight js/window)
|
||||
(let [width (.-width js/screen)
|
||||
height (.-height js/screen)
|
||||
landscape? (> width height)
|
||||
[width height] (if landscape? [height width] [width height])]
|
||||
[(case [width height]
|
||||
|
@ -103,7 +104,7 @@
|
|||
(defn native-ipad?
|
||||
[]
|
||||
(when-let [model (get-idevice-model)]
|
||||
(str/starts-with? (first model) "iPad")))
|
||||
(str/starts-with? (first model) "iPad")))
|
||||
|
||||
(defn get-idevice-statusbar-height
|
||||
[]
|
||||
|
|
|
@ -291,6 +291,7 @@
|
|||
(when (mobile-util/native-ios?) (.add cl "is-native-ios"))
|
||||
(when (mobile-util/native-android?) (.add cl "is-native-android"))
|
||||
(when (mobile-util/native-iphone?) (.add cl "is-native-iphone"))
|
||||
(when (mobile-util/native-ipad?) (.add cl "is-native-ipad"))
|
||||
(when (util/electron?)
|
||||
(js/window.apis.on "full-screen" #(js-invoke cl (if (= % "enter") "add" "remove") "is-fullscreen"))
|
||||
(p/then (ipc/ipc :getAppBaseInfo) #(let [{:keys [isFullScreen]} (js->clj % :keywordize-keys true)]
|
||||
|
|
Loading…
Reference in New Issue