1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import QtQuick 2.2
- import QtQuick.Controls 2.0
- import UM 1.5 as UM
- Item
- {
-
- property alias color: icon.color
-
- property int position: 0
-
- property int size: 32 * screenScaleFactor
-
- property string iconSource: Qt.resolvedUrl("../svg/icons/Extruder.svg")
- height: size
- width: size
- UM.ColorImage
- {
- id: icon
- anchors.fill: parent
- source: iconSource
- width: size
- }
- UM.Label
- {
- id: positionLabel
- anchors.centerIn: icon
- font: UM.Theme.getFont("small")
- height: Math.round(size / 2)
- horizontalAlignment: Text.AlignHCenter
- text: position + 1
- width: Math.round(size / 2)
- visible: position >= 0
- }
- }
|