Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: dci icon contorl support animation #362

Merged
merged 2 commits into from
Jul 31, 2024

Conversation

kegechen
Copy link
Contributor

@kegechen kegechen commented Jul 18, 2024

update checkbox / radio dci icon

linuxdeepin/dtkgui#247

@kegechen kegechen requested a review from zccrs July 18, 2024 08:10
@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kegechen

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Jul 18, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#362
@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jul 18, 2024

Doc Check bot
🟡 some documents missing!

File Line Symbol
src/private/dquickdciiconimage_p.h 52 void Dtk::Quick::DQuickDciIconImage::setTheme
src/private/dquickdciiconimage_p.h 54 DDciIconPalette Dtk::Quick::DQuickDciIconImage::palette
src/private/dquickdciiconimage_p.h 55 void Dtk::Quick::DQuickDciIconImage::setPalette
src/private/dquickdciiconimage_p.h 57 QSize Dtk::Quick::DQuickDciIconImage::sourceSize
src/private/dquickdciiconimage_p.h 58 void Dtk::Quick::DQuickDciIconImage::setSourceSize
src/private/dquickdciiconimage_p_p.h 24 Dtk::Quick::DQuickDciIconImageItemPrivate::DQuickDciIconImageItemPrivate
src/private/dquickdciiconimage_p_p.h 19 Dtk::Quick::DQuickDciIconImageItemPrivate
src/private/dquickdciiconimage_p_p.h 47 DDciIconPalette Dtk::Quick::DQuickDciIconImagePrivate::palette
src/private/dquickdciiconimage_p_p.h 42 Dtk::Quick::DQuickDciIconImagePrivate::DQuickDciIconImagePrivate
src/private/dquickdciiconimage_p_p.h 43 void Dtk::Quick::DQuickDciIconImagePrivate::layout
src/private/dquickdciiconimage_p_p.h 44 void Dtk::Quick::DQuickDciIconImagePrivate::updateImageSourceUrl
src/private/dquickdciiconimage_p_p.h 45 void Dtk::Quick::DQuickDciIconImagePrivate::play
src/private/dquickdciiconimage_p_p.h 37 Dtk::Quick::DQuickDciIconImagePrivate
src/private/dquickdciiconimage_p_p.h 48 DQuickIconImage* Dtk::Quick::DQuickDciIconImagePrivate::imageItem
src/private/dquickdciiconimage_p_p.h 49 DQMLGlobalObject::ControlState Dtk::Quick::DQuickDciIconImagePrivate::mode
src/private/dquickdciiconimage_p_p.h 50 DGuiApplicationHelper::ColorType Dtk::Quick::DQuickDciIconImagePrivate::theme
src/private/dquickdciiconimage_p_p.h 51 bool Dtk::Quick::DQuickDciIconImagePrivate::fallbackToQIcon
src/private/dquickiconimage_p.h 71 void Dtk::Quick::DQuickIconImage::nameChanged
src/private/dquickiconimage_p.h 72 void Dtk::Quick::DQuickIconImage::stateChanged
src/private/dquickiconimage_p.h 73 void Dtk::Quick::DQuickIconImage::modeChanged
src/private/dquickiconimage_p.h 74 void Dtk::Quick::DQuickIconImage::colorChanged
src/private/dquickiconimage_p.h 75 void Dtk::Quick::DQuickIconImage::fallbackSourceChanged
src/private/dquickiconimage_p_p.h 30 qreal Dtk::Quick::DQuickIconImagePrivate::calculateDevicePixelRatio
src/private/dquickiconimage_p_p.h 31 bool Dtk::Quick::DQuickIconImagePrivate::updateDevicePixelRatio
src/private/dquickiconimage_p_p.h 33 void Dtk::Quick::DQuickIconImagePrivate::updateBase64Image
src/private/dquickiconimage_p_p.h 35 QImage Dtk::Quick::DQuickIconImagePrivate::requestImageFromBase64

@@ -31,11 +72,10 @@ void DQuickDciIconImageItemPrivate::maybeUpdateUrl()
return DQuickIconImagePrivate::maybeUpdateUrl();
}

QUrl url;
url.setScheme(QLatin1String("image"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

都不走imageprovider了么?

Copy link
Contributor Author

@kegechen kegechen Jul 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

player 加载也可以改成异步。

deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Jul 24, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#362
@kegechen kegechen requested a review from zccrs July 25, 2024 03:30
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Jul 25, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#362
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Jul 25, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#362
@kegechen
Copy link
Contributor Author

_._20240725113815.mp4

deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Jul 25, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#362
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Jul 25, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#362
QString iconPath = findDciIconPath(parentPriv->imageItem->name(), appIconThemeName());

// 防止频繁构造 dciicon
if (player->property("_d_dci_icon_path").toString() != iconPath) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以给dciicon加个判断的接口,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个每次都是重新构造一个 DDciIcon, 只能说在 DQuickDciIconImageItemPrivate 加一个 iconPathCache

qt6/src/qml/Switch.qml Outdated Show resolved Hide resolved
qt6/src/qml/ButtonBox.qml Outdated Show resolved Hide resolved
src/private/dquickdciiconimage.cpp Outdated Show resolved Hide resolved
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Jul 26, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#362
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Jul 26, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#362
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Jul 30, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#362
update checkbox / radio / switch dci icons

switch: disable hover and set static image before after play
animation(use timer for now)
button group ( ButtonBox/ToolButton)
@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

Make sure to use the correct icon name for switch buttons

deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Jul 30, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#362
@kegechen kegechen merged commit 599d329 into linuxdeepin:dev/animation Jul 31, 2024
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants