mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-16 04:45:34 +00:00
scale favorites list with pixel ratio
This commit is contained in:
parent
49ee3550c4
commit
2f4d5fcab2
@ -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)`
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user