forked from Shinonome/dots-hyprland
move anime stuff in their own folder
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
import "root:/"
|
||||
import "root:/modules/common"
|
||||
import "root:/modules/common/widgets"
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Hyprland
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
Button {
|
||||
id: root
|
||||
property var imageData
|
||||
property var rowHeight
|
||||
|
||||
padding: 0
|
||||
|
||||
PointingHandInteraction {}
|
||||
|
||||
onClicked: {
|
||||
Hyprland.dispatch(`exec xdg-open ${imageData.source}`)
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitWidth: imageData.width
|
||||
implicitHeight: imageData.height
|
||||
radius: Appearance.rounding.small
|
||||
color: Appearance.colors.colLayer2
|
||||
}
|
||||
|
||||
contentItem: Image {
|
||||
id: imageData
|
||||
anchors.fill: parent
|
||||
sourceSize.width: imageRow.rowHeight * modelData.aspect_ratio
|
||||
sourceSize.height: imageRow.rowHeight
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: modelData.preview_url
|
||||
width: imageRow.rowHeight * modelData.aspect_ratio
|
||||
height: imageRow.rowHeight
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: OpacityMask {
|
||||
maskSource: Rectangle {
|
||||
width: imageData.width
|
||||
height: imageData.height
|
||||
radius: Appearance.rounding.small
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user