This repository has been archived on 2022-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
fanny-app/resources/qml/Components/CompatibleToolButton.qml
2020-01-25 12:01:10 +01:00

32 lines
660 B
QML

import QtQuick 2.0
import QtQuick.Controls 2.1
import QtQuick.Controls.Material 2.1
ToolButton {
id: tb
opacity: enabled ? 1.0 : 0.3
contentItem: Item {
Text {
anchors.centerIn: parent
anchors.horizontalCenterOffset: 3
text: tb.text
font.pixelSize: tb.height * 0.5
font.family: iconFont.name
color: app.style.style.textColor
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
}
FontLoader {
id: iconFont
source: "qrc:/fonts/IconFont.otf"
}
}