mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-06 23:39:27 -05:00
41 lines
1.1 KiB
QML
41 lines
1.1 KiB
QML
import qs.modules.common
|
|
import qs.modules.common.widgets
|
|
import qs.modules.common.functions
|
|
import Qt5Compat.GraphicalEffects
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
|
|
RippleButton {
|
|
id: root
|
|
required property string materialSymbol
|
|
required property bool current
|
|
horizontalPadding: 10
|
|
|
|
implicitHeight: 40
|
|
implicitWidth: implicitContentWidth + horizontalPadding * 2
|
|
buttonRadius: height / 2
|
|
|
|
colBackground: ColorUtils.transparentize(Appearance.colors.colSurfaceContainer)
|
|
colBackgroundHover: ColorUtils.transparentize(Appearance.colors.colOnSurface, current ? 1 : 0.95)
|
|
colRipple: ColorUtils.transparentize(Appearance.colors.colOnSurface, 0.95)
|
|
|
|
contentItem: Row {
|
|
id: contentRow
|
|
anchors.centerIn: parent
|
|
spacing: 6
|
|
|
|
MaterialSymbol {
|
|
id: icon
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
iconSize: 22
|
|
text: root.materialSymbol
|
|
}
|
|
StyledText {
|
|
id: label
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
text: root.text
|
|
}
|
|
}
|
|
}
|