forked from Shinonome/dots-hyprland
35 lines
1013 B
QML
35 lines
1013 B
QML
pragma ComponentBehavior: Bound
|
|
import QtQuick
|
|
import qs.modules.common
|
|
|
|
Item {
|
|
id: root
|
|
|
|
signal clicked(event: var)
|
|
property alias iconText: fabWidget.iconText
|
|
default property alias fabData: fabWidget.data
|
|
property bool enableShadow: true
|
|
|
|
anchors {
|
|
verticalCenter: parent.verticalCenter
|
|
}
|
|
implicitWidth: fabWidget.implicitWidth
|
|
implicitHeight: fabWidget.implicitHeight
|
|
Loader {
|
|
active: root.enableShadow
|
|
anchors.fill: parent
|
|
sourceComponent: StyledRectangularShadow {
|
|
target: fabWidget
|
|
radius: fabWidget.buttonRadius
|
|
}
|
|
}
|
|
FloatingActionButton {
|
|
id: fabWidget
|
|
onClicked: e => root.clicked(e)
|
|
baseSize: 48
|
|
colBackground: Appearance.colors.colTertiaryContainer
|
|
colBackgroundHover: Appearance.colors.colTertiaryContainerHover
|
|
colRipple: Appearance.colors.colTertiaryContainerActive
|
|
colOnBackground: Appearance.colors.colOnTertiaryContainer
|
|
}
|
|
} |