Refactor ZenGradientGenerator styles and logic for improved UI consistency and element sizing

This commit is contained in:
mr. M
2025-02-22 18:36:14 +01:00
parent f7c0b04884
commit cc0e18012d
2 changed files with 4 additions and 6 deletions

View File

@@ -361,21 +361,19 @@
position: absolute;
--rotation-padding: 15px;
width: calc(100% - var(--rotation-padding) * 2);
border-bottom: 0;
border-left: 0;
border-bottom-color: transparent;
height: calc(100% - var(--rotation-padding) * 2);
top: var(--rotation-padding);
left: var(--rotation-padding);
border-radius: 50%;
transform: rotate(-45deg);
opacity: 0;
pointer-events: none;
}
#PanelUI-zen-gradient-generator-rotation-dot {
position: absolute;
width: 30px;
height: 30px;
width: 25px;
height: 25px;
border-radius: 50%;
border: 1px solid var(--zen-colors-border);
background: var(--zen-colors-tertiary);

View File

@@ -1095,7 +1095,7 @@
const rotationPadding = 20;
const rotationParentWidth = rotationDot.parentElement.getBoundingClientRect().width;
const rotationDotPosition = this.currentRotation;
const rotationDotWidth = rotationDot.getBoundingClientRect().width;
const rotationDotWidth = 30;
const rotationDotX =
Math.cos((rotationDotPosition * Math.PI) / 180) * (rotationParentWidth / 2 - rotationDotWidth / 2);
const rotationDotY =