Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions qt6/src/qml/ArrowListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,23 @@ FocusScope {
}
interactive: itemsView.count > maxVisibleItems
ScrollIndicator.vertical: ScrollIndicator { }
highlight: HighlightPanel {
highlight: Control {
Comment thread
Ivy233 marked this conversation as resolved.
Resolved
visible: false // TODO listview's highlight is confict with Item's highlight.
outerShadowColor: null
innerShadowColor: null
hoverEnabled: false
scale: D.DTK.hasAnimation ? 0.9 : 1.0
Component.onCompleted: {
scale = 1.0
}
Behavior on scale {
NumberAnimation { duration: 100 }
}

// Keep the highlight panel under a Control so that its
// ColorSelector can resolve typed colors (e.g. D.Color.Highlight).
contentItem: HighlightPanel {
outerShadowColor: null
innerShadowColor: null
}
}
highlightFollowsCurrentItem: true
highlightMoveDuration: -1
Expand Down
16 changes: 11 additions & 5 deletions qt6/src/qml/Menu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,30 @@ T.Menu {
view.highlightMoveDuration: 50
view.highlightMoveVelocity: -1

view.highlight: HighlightPanel {
id: highlightRect
view.highlight: Control {
visible: false // TODO listview's highlight is confict with Item's highlight.
hoverEnabled: false
anchors.left: parent ? parent.left : undefined
anchors.right: parent ? parent.right : undefined
anchors.leftMargin: 0
anchors.rightMargin: 0
scale: D.DTK.hasAnimation ? 0.9 : 1.0

radius: DS.Style.menu.item.radius
outerShadowColor: null
innerShadowColor: null
Component.onCompleted: {
scale = 1.0
}
Behavior on scale {
NumberAnimation { duration: 100 }
}

// Keep the highlight panel under a Control so that its
// ColorSelector can resolve typed colors (e.g. D.Color.Highlight).
contentItem: HighlightPanel {
id: highlightRect
radius: DS.Style.menu.item.radius
outerShadowColor: null
innerShadowColor: null
}
}
}
Loader {
Expand Down
5 changes: 5 additions & 0 deletions src/private/dquickcontrolpalette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,11 @@ QColor DQuickControlColorSelector::getColorOf(const DQuickControlPalette *palett
if (targetColor.isTypedColor()) {
if (m_control)
colorValue = targetColor.toColor(_d_getControlPalette(m_control));
else
// no control in the parent chain (e.g. popup/window context):
// fall back to the application-wide standard palette instead of
// returning an invalid color
colorValue = targetColor.toColor(DGuiApplicationHelper::standardPalette(state->controlTheme));
} else {
colorValue = targetColor.color();
}
Expand Down
Loading