mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 13:49:39 +08:00

Subdivided the new icons in 3 size categories. As requested by UX Used the company naming scheme for uniformity and easy recognition. Known issues: - Top/Bottom category wasn't taken into account by UX at the time. Since this is a recent addition. Both the Walls and Top/Bottom will be updated. - Cloud/Network connection icons 12px don't render correctly. Due to the theme-ing. - Extruder Icons do not render correctly. CURA-8010_new_icons
63 lines
1.8 KiB
QML
63 lines
1.8 KiB
QML
// Copyright (c) 2015 Ultimaker B.V.
|
|
// Uranium is released under the terms of the LGPLv3 or higher.
|
|
|
|
import QtQuick 2.2
|
|
import QtQuick.Controls 1.1
|
|
import QtQuick.Controls.Styles 1.1
|
|
import QtQuick.Layouts 1.1
|
|
|
|
import UM 1.1 as UM
|
|
|
|
import ".."
|
|
|
|
Button {
|
|
id: base;
|
|
|
|
style: ButtonStyle {
|
|
background: Item { }
|
|
label: Row
|
|
{
|
|
spacing: UM.Theme.getSize("default_lining").width
|
|
|
|
UM.RecolorImage
|
|
{
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
height: (label.height / 2) | 0
|
|
width: height
|
|
source: control.checked ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight");
|
|
color: control.hovered ? palette.highlight : palette.buttonText
|
|
}
|
|
UM.RecolorImage
|
|
{
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
height: label.height
|
|
width: height
|
|
source: control.iconSource
|
|
color: control.hovered ? palette.highlight : palette.buttonText
|
|
}
|
|
Label
|
|
{
|
|
id: label
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
text: control.text
|
|
color: control.hovered ? palette.highlight : palette.buttonText
|
|
font.bold: true
|
|
}
|
|
|
|
SystemPalette { id: palette }
|
|
}
|
|
}
|
|
|
|
signal showTooltip(string text);
|
|
signal hideTooltip();
|
|
signal contextMenuRequested()
|
|
|
|
text: definition.label
|
|
iconSource: UM.Theme.getIcon(definition.icon)
|
|
|
|
checkable: true
|
|
checked: definition.expanded
|
|
|
|
onClicked: definition.expanded ? settingDefinitionsModel.collapseRecursive(definition.key) : settingDefinitionsModel.expandRecursive(definition.key)
|
|
}
|