mirror of
https://github.com/celesrenata/end-4-flakes.git
synced 2026-06-06 02:39:27 -05:00
36 lines
1018 B
QML
36 lines
1018 B
QML
import qs.modules.common
|
|
import qs.modules.common.widgets
|
|
import QtQuick
|
|
|
|
RippleButton {
|
|
id: button
|
|
property string buttonText: ""
|
|
property string tooltipText: ""
|
|
property bool forceCircle: false
|
|
|
|
implicitHeight: 30
|
|
implicitWidth: forceCircle ? implicitHeight : (contentItem.implicitWidth + 10 * 2)
|
|
Behavior on implicitWidth {
|
|
SmoothedAnimation {
|
|
velocity: Appearance.animation.elementMove.velocity
|
|
}
|
|
}
|
|
|
|
background.anchors.fill: button
|
|
buttonRadius: Appearance.rounding.full
|
|
colBackground: Appearance.colors.colLayer2
|
|
colBackgroundHover: Appearance.colors.colLayer2Hover
|
|
colRipple: Appearance.colors.colLayer2Active
|
|
|
|
contentItem: StyledText {
|
|
text: buttonText
|
|
horizontalAlignment: Text.AlignHCenter
|
|
font.pixelSize: Appearance.font.pixelSize.larger
|
|
color: Appearance.colors.colOnLayer1
|
|
}
|
|
|
|
StyledToolTip {
|
|
content: tooltipText
|
|
extraVisibleCondition: tooltipText.length > 0
|
|
}
|
|
} |