scale favorites list with pixel ratio

This commit is contained in:
SpikeHD 2022-04-24 23:55:36 -07:00
parent 49ee3550c4
commit 2f4d5fcab2
2 changed files with 5 additions and 4 deletions

View File

@ -230,11 +230,11 @@ async function handleFavoriteList() {
const transform = window.getComputedStyle(document.querySelector('#ipList')).transform
const xy = [ transform.split(',')[4], transform.split(',')[5] ]
let newY = parseInt(xy[1].replace(')', '')) - (27 * ipArr.length)
let newY = (27 * ipArr.length) * window.devicePixelRatio
if (ipArr.length === 0) newY -= 27
if (ipArr.length === 0 || ipArr.length === 1) newY = 0
ipList.style.transform = `translate(${xy[0]}px, ${newY}px)`
ipList.style.transform = `translate(${xy[0]}px, calc(56vh - ${newY}px)`
}
}

View File

@ -52,6 +52,7 @@ body {
#settingsPanel {
width: 35%;
height: 80%;
overflow: hidden;
}
#fullSettingsTitle {
@ -336,7 +337,7 @@ body {
}
#firstPanel {
background-position: -250px;
background-position: -200px;
}
/* Move the first official button to the position on the png */