diff --git a/qt6/src/qml/ArrowListView.qml b/qt6/src/qml/ArrowListView.qml index ec16f967a..94bc24f9b 100644 --- a/qt6/src/qml/ArrowListView.qml +++ b/qt6/src/qml/ArrowListView.qml @@ -49,20 +49,6 @@ FocusScope { } interactive: Window.window ? (contentHeight > Window.window.height || model.count > maxVisibleItems) : false ScrollIndicator.vertical: ScrollIndicator { } - highlight: Rectangle { - anchors.left: parent.left - anchors.right: parent.right - anchors.leftMargin: 6 - anchors.rightMargin: 6 - anchors.topMargin: 6 - anchors.bottomMargin: 6 - property D.Palette backgroundColor: DS.Style.highlightPanel.background - color: D.ColorSelector.backgroundColor - radius: 6 // TODO can't display background when using dtk's InWindowBlur. - } - highlightFollowsCurrentItem: true - highlightMoveDuration: -1 - highlightMoveVelocity: 400 } P.ArrowListViewButton { diff --git a/qt6/src/qml/Menu.qml b/qt6/src/qml/Menu.qml index 460389912..110c070d9 100644 --- a/qt6/src/qml/Menu.qml +++ b/qt6/src/qml/Menu.qml @@ -79,6 +79,27 @@ T.Menu { onCountChanged: refreshContentItemWidth() onWidthChanged: refreshContentItemWidth() + view.highlightFollowsCurrentItem: true + view.highlightMoveDuration: 50 + view.highlightMoveVelocity: -1 + + view.highlight: Rectangle { + anchors.left: parent ? parent.left : undefined + anchors.right: parent ? parent.right : undefined + anchors.leftMargin: 6 + anchors.rightMargin: 6 + scale: 0.9 + property D.Palette backgroundColor: DS.Style.highlightPanel.background + color: D.ColorSelector.backgroundColor + radius: 6 + Component.onCompleted: { + scale = 1.0 + } + Behavior on scale { + NumberAnimation { duration: 100 } + } + + } } Loader { Layout.fillWidth: true diff --git a/qt6/src/qml/MenuItem.qml b/qt6/src/qml/MenuItem.qml index 8e22b1e6b..61fffa75d 100644 --- a/qt6/src/qml/MenuItem.qml +++ b/qt6/src/qml/MenuItem.qml @@ -43,6 +43,9 @@ T.MenuItem { text: control.text font: control.font color: control.palette.windowText + Behavior on color { + ColorAnimation { duration: control.hovered ? 100 : 0; } + } icon: D.DTK.makeIcon(control.icon, control.D.DciIcon) } diff --git a/src/private/dquickiconlabel.cpp b/src/private/dquickiconlabel.cpp index cc7c7f997..94dda0ea5 100644 --- a/src/private/dquickiconlabel.cpp +++ b/src/private/dquickiconlabel.cpp @@ -473,6 +473,7 @@ void DQuickIconLabel::setColor(const QColor &color) d->color = color; if (d->label) d->label->setColor(color); + Q_EMIT colorChanged(color); } DQuickIconLabel::Display DQuickIconLabel::display() const diff --git a/src/private/dquickiconlabel_p.h b/src/private/dquickiconlabel_p.h index ac675040d..19db472f4 100644 --- a/src/private/dquickiconlabel_p.h +++ b/src/private/dquickiconlabel_p.h @@ -21,7 +21,7 @@ class DQuickIconLabel : public QQuickItem Q_PROPERTY(DTK_QUICK_NAMESPACE::DQuickDciIcon icon READ icon WRITE setIcon FINAL) Q_PROPERTY(QString text READ text WRITE setText FINAL) Q_PROPERTY(QFont font READ font WRITE setFont FINAL) - Q_PROPERTY(QColor color READ color WRITE setColor FINAL) + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL) Q_PROPERTY(Display display READ display WRITE setDisplay FINAL) Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing FINAL) Q_PROPERTY(bool mirrored READ isMirrored WRITE setMirrored FINAL) @@ -87,6 +87,9 @@ class DQuickIconLabel : public QQuickItem void setBottomPadding(qreal padding); void resetBottomPadding(); +Q_SIGNALS: + void colorChanged(const QColor &color); + protected: void componentComplete() override; #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)