mirror of
https://github.com/kossLAN/dots.git
synced 2025-11-04 22:49:50 -05:00
35 lines
651 B
QML
35 lines
651 B
QML
import QtQuick
|
|
import Quickshell
|
|
import "../../widgets/" as Widgets
|
|
import "../.."
|
|
|
|
|
|
Widgets.IconButton {
|
|
required property var bar;
|
|
|
|
id: iconButton
|
|
implicitSize: 20
|
|
source: "root:/resources/volume/volume-full.svg"
|
|
padding: 2
|
|
|
|
onClicked:{
|
|
if (volumeControl.visible) {
|
|
volumeControl.hide()
|
|
}
|
|
else {
|
|
volumeControl.show()
|
|
}
|
|
}
|
|
|
|
ControlPanel {
|
|
id: volumeControl
|
|
|
|
anchor {
|
|
window: bar
|
|
|
|
onAnchoring: {
|
|
anchor.rect = mapToItem(bar.contentItem, 0, bar.height, width , 0);
|
|
}
|
|
}
|
|
}
|
|
}
|