File: MonitorContextMenuButton.qml

package info (click to toggle)
cura 5.0.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 122,888 kB
  • sloc: python: 44,572; sh: 81; xml: 32; makefile: 16
file content (31 lines) | stat: -rw-r--r-- 877 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2019 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.

import QtQuick 2.3
import QtQuick.Controls 2.0
import UM 1.5 as UM
import Cura 1.0 as Cura

Button
{
    id: base
    background: Rectangle
    {
        color: enabled ? UM.Theme.getColor("viewport_background") : "transparent"
        height: base.height
        opacity: base.down || base.hovered ? 1 : 0
        radius: Math.round(0.5 * width)
        width: base.width
    }
    contentItem: UM.Label
    {
        color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
        font.pixelSize: 32 * screenScaleFactor
        horizontalAlignment: Text.AlignHCenter
        text: base.text
    }
    height: width
    hoverEnabled: enabled
    text: "\u22EE" //Unicode Three stacked points.
    width: 36 * screenScaleFactor // TODO: Theme!
}