Something went wrong. Try again.
my over complex system configurations
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445import QtQuickimport QtQuick.Layoutsimport qs.data
Clickable { id: root
property string text: "" property string icon: "" property bool filled: false property color fillColor: Theme.colors.accent property int fontSize: 12 opacity: enabled ? 1 : 0.5
implicitWidth: text === "" ? implicitHeight : row.implicitWidth + 28 implicitHeight: 36 radius: Theme.radiusSm color: filled ? (hovered ? Qt.lighter(fillColor, 1.08) : fillColor) : hovered ? Theme.colors.surfaceRaised : "transparent" border.width: 1 border.color: filled ? fillColor : Theme.colors.borderStrong
RowLayout { id: row anchors.centerIn: parent spacing: 6
MyIcon { visible: root.icon !== "" icon: root.icon size: Math.round(root.fontSize * 1.25) color: root.filled ? Theme.colors.textOnAccent : Theme.colors.text }
StyledText { visible: root.text !== "" text: root.text font.pixelSize: root.fontSize font.weight: Font.DemiBold color: root.filled ? Theme.colors.textOnAccent : Theme.colors.text } }}