mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
fix: top bar not showing in certain specific situations
This commit is contained in:
@@ -129,17 +129,12 @@ function handleScroll() {
|
||||
scrollTop.value = document.documentElement.scrollTop
|
||||
}
|
||||
|
||||
// Set a certain offset in pixels to prevent minor scrolling from triggering adjustments
|
||||
// in the top bar visibility
|
||||
const offset = 5
|
||||
if (settings.value.autoHideTopbar && !hovingTopbar.value && scrollTop.value !== 0) {
|
||||
if (Math.abs(scrollTop.value - oldScrollTop.value) < offset) {
|
||||
if (scrollTop.value > oldScrollTop.value)
|
||||
toggleTopbarVisible(false)
|
||||
if (scrollTop.value > oldScrollTop.value)
|
||||
toggleTopbarVisible(false)
|
||||
|
||||
else
|
||||
toggleTopbarVisible(true)
|
||||
}
|
||||
else
|
||||
toggleTopbarVisible(true)
|
||||
}
|
||||
|
||||
oldScrollTop.value = scrollTop.value
|
||||
@@ -282,7 +277,7 @@ defineExpose({
|
||||
:style="{
|
||||
background: `linear-gradient(to bottom, ${settings.wallpaper
|
||||
|| settings.useSearchPageModeOnHomePage && settings.searchPageWallpaper && settings.individuallySetSearchPageWallpaper
|
||||
? 'rgba(0,0,0,.6)' : 'var(--bew-bg)'}, transparent)`
|
||||
? 'rgba(0,0,0,.6)' : 'var(--bew-bg)'}, transparent)`,
|
||||
}"
|
||||
/>
|
||||
</Transition>
|
||||
|
||||
Reference in New Issue
Block a user