MaterialIcon opsz clamp, UPower popout and widget changes, improved SysTray hover detection logic
This commit is contained in:
@@ -1,15 +1,26 @@
|
||||
import qs.Config
|
||||
|
||||
CustomText {
|
||||
property real fill
|
||||
id: root
|
||||
|
||||
readonly property list<int> allowed: [20, 24, 40, 48]
|
||||
property real fill: 0
|
||||
property int grade: DynamicColors.light ? 0 : -25
|
||||
readonly property int opsz: clampOpsz(optical)
|
||||
property int optical: fontInfo.pixelSize
|
||||
|
||||
function clampOpsz(value): int {
|
||||
return allowed.reduce((closest, current) => {
|
||||
return Math.abs(current - value) < Math.abs(closest - value) ? current : closest;
|
||||
});
|
||||
}
|
||||
|
||||
font.family: "Material Symbols Rounded"
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
font.variableAxes: ({
|
||||
FILL: fill.toFixed(1),
|
||||
FILL: fill,
|
||||
GRAD: grade,
|
||||
opsz: fontInfo.pixelSize,
|
||||
opsz: opsz,
|
||||
wght: fontInfo.weight
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user