fix: Fixed incorrect dot possition and scaling, b=no-bug, c=common, workspaces

This commit is contained in:
mr. m
2025-12-08 01:40:53 +01:00
parent 832b0c4fe3
commit 85d52d15c2
3 changed files with 13 additions and 8 deletions

View File

@@ -18,13 +18,13 @@
@keyframes zen-theme-picker-dot-animation {
from {
transform: scale(0.8) translate(-25%, -25%);
transform: scale(0.8) translate(-50%, -50%);
}
50% {
transform: scale(1.2) translate(-25%, -25%);
transform: scale(1.2) translate(-50%, -50%);
}
to {
transform: scale(1) translate(-25%, -25%);
transform: scale(1) translate(-50%, -50%);
}
}

View File

@@ -799,8 +799,12 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature {
gZenUIManager.motion.animate(
existingDot.element,
{
left: `${dotPosition.position.x}px`,
top: `${dotPosition.position.y}px`,
left: existingDot.element.style.left
? [existingDot.element.style.left, `${dotPosition.position.x}px`]
: `${dotPosition.position.x}px`,
top: existingDot.element.style.top
? [existingDot.element.style.top, `${dotPosition.position.y}px`]
: `${dotPosition.position.y}px`,
},
{
duration: 0.4,

View File

@@ -271,9 +271,10 @@
cursor: pointer;
border: 3px solid #ffffff;
animation: zen-theme-picker-dot-animation 0.5s;
transform: translate(-25%, -25%);
transform: translate(-50%, -50%);
pointer-events: none;
transform-origin: center center;
transform-origin: left top;
margin: 10px 0 0 10px;
&:first-of-type {
width: 38px;
@@ -284,7 +285,7 @@
transition: transform 0.2s;
z-index: 999;
&:hover {
transform: scale(1.05) translate(-25%, -25%);
transform: scale(1.05) translate(-50%, -50%);
}
}