This commit is contained in:
朱子楚\zhuzi 2023-07-05 21:34:08 +08:00
parent ff93a6204a
commit ad4d077480
5 changed files with 11 additions and 9 deletions

View File

@ -175,12 +175,6 @@ CustomWindow {
displayMode:MainEvent.displayMode
logo: "qrc:/example/res/image/favicon.ico"
title:"FluentUI"
Behavior on rotation {
NumberAnimation{
duration: 167
}
}
transformOrigin: Item.Center
onLogoClicked:{
clickCount += 1
if(clickCount === 1){

View File

@ -5,6 +5,7 @@
CircularReveal::CircularReveal(QQuickItem* parent) : QQuickPaintedItem(parent)
{
setVisible(false);
_anim = new QPropertyAnimation(this, "radius", this);
_anim->setDuration(333);
_anim->setEasingCurve(QEasingCurve::OutCubic);
@ -19,6 +20,7 @@ CircularReveal::CircularReveal(QQuickItem* parent) : QQuickPaintedItem(parent)
void CircularReveal::paint(QPainter* painter)
{
painter->save();
painter->eraseRect(boundingRect());
painter->drawImage(QRect(0, 0, static_cast<int>(width()), static_cast<int>(height())), _source);
QPainterPath path;
path.moveTo(_center.x(),_center.y());

View File

@ -31,7 +31,6 @@ Item{
var y = 0;
var w = control.width;
var h = control.height;
ctx.setTransform(1, 0, 0, 1, 0, 0);
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.save();
ctx.beginPath();

View File

@ -56,7 +56,6 @@ Rectangle {
renderTarget: Canvas.Image
onPaint: {
var ctx = canvas.getContext("2d")
ctx.setTransform(1, 0, 0, 1, 0, 0)
ctx.clearRect(0, 0, canvas.width, canvas.height)
ctx.save()
ctx.lineWidth = linWidth

View File

@ -9,6 +9,15 @@ Item{
property bool shadow: true
default property alias contentItem: container.data
id:control
onWidthChanged: {
canvas.requestPaint()
}
onHeightChanged: {
canvas.requestPaint()
}
onRadiusChanged: {
canvas.requestPaint()
}
FluShadow{
anchors.fill: container
radius: control.radius[0]
@ -36,7 +45,6 @@ Item{
var y = 0;
var w = control.width;
var h = control.height;
ctx.setTransform(1, 0, 0, 1, 0, 0);
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.save();
ctx.beginPath();