fix pixelround

Signed-off-by: z30053720 <zhaoyong70@huawei.com>
This commit is contained in:
z30053720 2024-07-31 18:38:08 +08:00
parent 70addc0373
commit 905c311868
2 changed files with 4 additions and 8 deletions

View File

@ -544,9 +544,6 @@ class SelectItem extends ViewPU {
y: this.zoomScaleArray[this.selectedIndexes[0]]
});
Stack.shadow(ShadowStyle.OUTER_DEFAULT_XS);
Stack.pixelRound({
top: PixelRoundCalcPolicy.FORCE_FLOOR
});
}, Stack);
Stack.pop();
});
@ -1470,7 +1467,8 @@ class SegmentButtonItemArrayComponent extends ViewPU {
this.buttonItemsPosition[s37] = {
start: LengthMetrics.vp(Number.parseFloat(this.options.componentPadding.toString()) +
(Number.parseFloat(i39.width.toString()) + 1) * s37),
top: LengthMetrics.vp(Number.parseFloat(this.options.componentPadding.toString()))
top: LengthMetrics.px(Math.floor(this.getUIContext()
.vp2px(Number.parseFloat(this.options.componentPadding.toString()))))
};
}
});

View File

@ -398,9 +398,6 @@ struct SelectItem {
.position(this.selectedItemPosition)
.scale({ x: this.zoomScaleArray[this.selectedIndexes[0]], y: this.zoomScaleArray[this.selectedIndexes[0]] })
.shadow(ShadowStyle.OUTER_DEFAULT_XS)
.pixelRound({
top: PixelRoundCalcPolicy.FORCE_FLOOR
})
}
}
}
@ -799,7 +796,8 @@ struct SegmentButtonItemArrayComponent {
this.buttonItemsPosition[index] = {
start: LengthMetrics.vp(Number.parseFloat(this.options.componentPadding.toString()) +
(Number.parseFloat(newValue.width.toString()) + 1) * index),
top: LengthMetrics.vp(Number.parseFloat(this.options.componentPadding.toString()))
top: LengthMetrics.px(Math.floor(this.getUIContext()
.vp2px(Number.parseFloat(this.options.componentPadding.toString()))))
}
}
})