forked from Shinonome/dots-hyprland
booru: next button/command
This commit is contained in:
@@ -91,9 +91,9 @@ Button {
|
||||
PointingHandInteraction {}
|
||||
|
||||
background: Rectangle {
|
||||
color: menuButton.down ? Appearance.mix(Appearance.colors.colScrim, Appearance.m3colors.m3onSurface, 0.6) :
|
||||
menuButton.hovered ? Appearance.mix(Appearance.colors.colScrim, Appearance.m3colors.m3onSurface, 0.8) :
|
||||
Appearance.colors.colScrim
|
||||
color: menuButton.down ? Appearance.transparentize(Appearance.mix(Appearance.m3colors.m3surface, Appearance.m3colors.m3onSurface, 0.6), 0.1) :
|
||||
menuButton.hovered ? Appearance.transparentize(Appearance.mix(Appearance.m3colors.m3surface, Appearance.m3colors.m3onSurface, 0.8), 0.2) :
|
||||
Appearance.transparentize(Appearance.m3colors.m3surface, 0.3)
|
||||
radius: Appearance.rounding.full
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ Button {
|
||||
buttonText: "Open file link"
|
||||
onClicked: {
|
||||
root.showActions = false
|
||||
Hyprland.dispatch("global quickshell:sidebarLeftClose")
|
||||
// Hyprland.dispatch("global quickshell:sidebarLeftClose")
|
||||
Hyprland.dispatch(`exec xdg-open '${root.imageData.file_url}'`)
|
||||
}
|
||||
}
|
||||
@@ -152,7 +152,7 @@ Button {
|
||||
buttonText: "Download"
|
||||
onClicked: {
|
||||
root.showActions = false
|
||||
Hyprland.dispatch("global quickshell:sidebarLeftClose")
|
||||
// Hyprland.dispatch("global quickshell:sidebarLeftClose")
|
||||
Hyprland.dispatch(`exec curl '${root.imageData.file_url}' -o '${root.imageData.is_nsfw ? root.nsfwPath : root.downloadPath}/${root.fileName}' && notify-send 'Download complete' '${root.downloadPath}/${root.fileName}'`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,5 +218,44 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Button { // Next page button
|
||||
id: button
|
||||
property string buttonText
|
||||
visible: root.responseData.page != "" && root.responseData.page > 0
|
||||
|
||||
Layout.alignment: Qt.AlignRight
|
||||
implicitHeight: 30
|
||||
leftPadding: 10
|
||||
rightPadding: 10
|
||||
|
||||
PointingHandInteraction {}
|
||||
onClicked: {
|
||||
tagInputField.text = `${responseData.tags.join(" ")} ${parseInt(root.responseData.page) + 1}`
|
||||
tagInputField.accept()
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
radius: Appearance.rounding.small
|
||||
color: (button.down ? Appearance.colors.colSurfaceContainerHighestActive :
|
||||
button.hovered ? Appearance.colors.colSurfaceContainerHighestHover :
|
||||
Appearance.m3colors.m3surfaceContainerHighest)
|
||||
}
|
||||
|
||||
contentItem: RowLayout {
|
||||
spacing: 0
|
||||
StyledText {
|
||||
Layout.alignment: Text.AlignVCenter
|
||||
text: "Next page"
|
||||
color: Appearance.m3colors.m3onSurface
|
||||
}
|
||||
MaterialSymbol {
|
||||
Layout.alignment: Text.AlignVCenter
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
color: Appearance.m3colors.m3onSurface
|
||||
text: "chevron_right"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user