mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-01 23:51:48 +08:00
update
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
project(example VERSION 0.1 LANGUAGES CXX)
|
||||
project(example VERSION 1.0)
|
||||
|
||||
#配置通用编译
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
@ -83,6 +83,7 @@ FluScrollablePage{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: {
|
||||
FluApp.useSystemAppBar = !FluApp.useSystemAppBar
|
||||
dialog_restart.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ FluWindow {
|
||||
id:tour
|
||||
steps:{
|
||||
var data = []
|
||||
if(!FluApp.useSystemAppBar){
|
||||
if(!window.useSystemAppBar){
|
||||
data.push({title:"夜间模式",description: "这里可以切换夜间模式.",target:()=>appBar.darkButton()})
|
||||
}
|
||||
data.push({title:"隐藏彩蛋",description: "多点几下试试!!",target:()=>nav_view.logoButton()})
|
||||
|
@ -86,6 +86,7 @@ FluScrollablePage{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: {
|
||||
FluApp.useSystemAppBar = !FluApp.useSystemAppBar
|
||||
dialog_restart.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ FluWindow {
|
||||
id:tour
|
||||
steps:{
|
||||
var data = []
|
||||
if(!FluApp.useSystemAppBar){
|
||||
if(!window.useSystemAppBar){
|
||||
data.push({title:"夜间模式",description: "这里可以切换夜间模式.",target:()=>appBar.darkButton()})
|
||||
}
|
||||
data.push({title:"隐藏彩蛋",description: "多点几下试试!!",target:()=>nav_view.logoButton()})
|
||||
|
@ -5,10 +5,11 @@
|
||||
|
||||
CircularReveal::CircularReveal(QQuickItem* parent) : QQuickPaintedItem(parent)
|
||||
{
|
||||
_anim = new QPropertyAnimation(this, "radius", this);
|
||||
setVisible(false);
|
||||
_anim.setDuration(333);
|
||||
_anim.setEasingCurve(QEasingCurve::OutCubic);
|
||||
connect(&_anim, &QPropertyAnimation::finished,this,[=](){
|
||||
_anim->setDuration(333);
|
||||
_anim->setEasingCurve(QEasingCurve::OutCubic);
|
||||
connect(_anim, &QPropertyAnimation::finished,this,[=](){
|
||||
update();
|
||||
setVisible(false);
|
||||
Q_EMIT animationFinished();
|
||||
@ -31,8 +32,8 @@ void CircularReveal::paint(QPainter* painter)
|
||||
}
|
||||
|
||||
void CircularReveal::start(int w,int h,const QPoint& center,int radius){
|
||||
_anim.setStartValue(0);
|
||||
_anim.setEndValue(radius);
|
||||
_anim->setStartValue(0);
|
||||
_anim->setEndValue(radius);
|
||||
_center = center;
|
||||
_grabResult = _target->grabToImage(QSize(w,h));
|
||||
connect(_grabResult.data(), &QQuickItemGrabResult::ready, this, &CircularReveal::handleGrabResult);
|
||||
@ -43,5 +44,5 @@ void CircularReveal::handleGrabResult(){
|
||||
update();
|
||||
setVisible(true);
|
||||
Q_EMIT imageChanged();
|
||||
_anim.start();
|
||||
_anim->start();
|
||||
}
|
||||
|
@ -20,8 +20,8 @@ public:
|
||||
Q_SIGNAL void animationFinished();
|
||||
Q_SLOT void handleGrabResult();
|
||||
private:
|
||||
QPropertyAnimation* _anim = nullptr;
|
||||
QImage _source;
|
||||
QPropertyAnimation _anim = QPropertyAnimation(this, "radius", this);
|
||||
QPoint _center;
|
||||
QSharedPointer<QQuickItemGrabResult> _grabResult;
|
||||
};
|
||||
|
Reference in New Issue
Block a user