This commit is contained in:
Henry Jameson 2026-09-10 19:20:35 +03:00
commit 313a1758a5
4 changed files with 30 additions and 27 deletions

View file

@ -1,5 +1,5 @@
import { computed, ref, toValue, watch } from 'vue'
import { storeToRefs } from 'pinia'
import { computed, ref, watch } from 'vue'
import { useMergedConfigStore } from 'src/stores/merged_config.js'
@ -20,17 +20,19 @@ export function useInterfaceSizes() {
watch(fontSizeSetting, updateFontSize, { immediate: true })
const navbarSize = computed(() => {
const string = fontSize.value * window
.getComputedStyle(document.body)
.getPropertyValue('--navbarSize')
const string =
fontSize.value *
window.getComputedStyle(document.body).getPropertyValue('--navbarSize')
return fontSize.value * Number.parseInt(string.slice(0, -3), 10) // remove the 'rem'
})
const panelHeaderSize = computed(() => {
const string = fontSize.value * window
.getComputedStyle(document.body)
.getPropertyValue('--panelHeaderSize')
const string =
fontSize.value *
window
.getComputedStyle(document.body)
.getPropertyValue('--panelHeaderSize')
return fontSize.value * Number.parseInt(string.slice(0, -3), 10) // remove the 'rem'
})