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

fix: avoid hover animation for grid items #435

Merged
merged 1 commit into from
Oct 10, 2024
Merged
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
4 changes: 4 additions & 0 deletions qml/FullscreenFrame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import org.deepin.dtk.style 1.0 as DS

import org.deepin.launchpad 1.0
import org.deepin.launchpad.models 1.0
import 'windowed' as WindowedLaunchpad

InputEventItem {
anchors.fill: parent
Expand Down Expand Up @@ -146,6 +147,9 @@ InputEventItem {
anchors.right: fullscreenHeader.right
ColorSelector.family: Palette.CrystalColor
icon.name: "launcher_exit_fullscreen"
background: WindowedLaunchpad.ItemBackground {
button: exitFullscreenBtn
}
onClicked: {
searchEdit.text = ""
LauncherController.currentFrame = "WindowedFrame"
Expand Down
28 changes: 6 additions & 22 deletions qml/IconItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import org.deepin.dtk.style 1.0 as DS

import org.deepin.launchpad 1.0
import org.deepin.launchpad.models 1.0
import 'windowed'

Control {
id: root
Expand Down Expand Up @@ -51,9 +52,11 @@ Control {
}
}

contentItem: ToolButton {
contentItem: Button {
focusPolicy: Qt.NoFocus
ColorSelector.pressed: false
ColorSelector.family: D.Palette.CrystalColor
flat: true
contentItem: Column {
anchors.fill: parent

Expand Down Expand Up @@ -223,28 +226,9 @@ Control {
ToolTip.text: root.text
ToolTip.delay: 1000
ToolTip.visible: hovered && iconItemLabel.truncated
background: ButtonPanel {
button: parent
outsideBorderColor: null
background: ItemBackground {
radius: isWindowedMode ? 8 : 18
insideBorderColor: isWindowedMode ? null : DS.Style.button.insideBorder

property D.Palette background: D.Palette {
normal {
common: Qt.rgba(0, 0, 0, 0.1)
crystal: Qt.rgba(0, 0, 0, 0.1)
}
normalDark {
common: Qt.rgba(1, 1, 1, 0.1)
crystal: Qt.rgba(1, 1, 1, 0.1)
}
hovered {
common: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.1)
crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.1)
}
}
color1: isWindowedMode ? background : DS.Style.button.background1
color2: isWindowedMode ? background : DS.Style.button.background2
button: parent
}
}
background: DebugBounding { }
Expand Down
4 changes: 3 additions & 1 deletion qml/windowed/IconItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ Control {
signal itemClicked()
signal menuTriggered()

contentItem: ToolButton {
contentItem: Button {
id: iconButton
focusPolicy: Qt.NoFocus
ColorSelector.pressed: false
ColorSelector.family: Palette.CrystalColor
flat: true
contentItem: Column {
anchors.fill: parent

Expand Down
Loading