mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-26 06:24:34 +08:00
Remove unused styles
This commit is contained in:
parent
309061ce31
commit
14b460a626
@ -2,9 +2,7 @@
|
|||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Controls.Styles 1.1
|
|
||||||
import QtQuick.Layouts 1.1
|
|
||||||
|
|
||||||
import UM 1.2 as UM
|
import UM 1.2 as UM
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.0 as Cura
|
||||||
@ -68,7 +66,6 @@ Item
|
|||||||
|
|
||||||
toolItem: UM.RecolorImage
|
toolItem: UM.RecolorImage
|
||||||
{
|
{
|
||||||
opacity: parent.enabled ? 1.0 : 0.2
|
|
||||||
source: (UM.Theme.getIcon(model.icon) != "") ? UM.Theme.getIcon(model.icon) : "file:///" + model.location + "/" + model.icon
|
source: (UM.Theme.getIcon(model.icon) != "") ? UM.Theme.getIcon(model.icon) : "file:///" + model.location + "/" + model.icon
|
||||||
color: UM.Theme.getColor("toolbar_button_text")
|
color: UM.Theme.getColor("toolbar_button_text")
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ Button
|
|||||||
}
|
}
|
||||||
else if (base.checked)
|
else if (base.checked)
|
||||||
{
|
{
|
||||||
return "red" //UM.Theme.getColor("toolbar_button_active")
|
return UM.Theme.getColor("toolbar_button_active")
|
||||||
}
|
}
|
||||||
else if(base.hovered)
|
else if(base.hovered)
|
||||||
{
|
{
|
||||||
@ -81,6 +81,7 @@ Button
|
|||||||
|
|
||||||
contentItem: Item
|
contentItem: Item
|
||||||
{
|
{
|
||||||
|
opacity: parent.enabled ? 1.0 : 0.2
|
||||||
Loader
|
Loader
|
||||||
{
|
{
|
||||||
id: contentItemLoader
|
id: contentItemLoader
|
||||||
|
@ -171,123 +171,6 @@ QtObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property Component toolbar_button: Component
|
|
||||||
{
|
|
||||||
ButtonStyle
|
|
||||||
{
|
|
||||||
background: Rectangle
|
|
||||||
{
|
|
||||||
implicitWidth: Theme.getSize("button").width
|
|
||||||
implicitHeight: Theme.getSize("button").height
|
|
||||||
color:
|
|
||||||
{
|
|
||||||
if (control.checked && control.hovered)
|
|
||||||
{
|
|
||||||
return Theme.getColor("toolbar_button_active_hover")
|
|
||||||
}
|
|
||||||
else if (control.checked)
|
|
||||||
{
|
|
||||||
return Theme.getColor("toolbar_button_active")
|
|
||||||
}
|
|
||||||
else if(control.hovered)
|
|
||||||
{
|
|
||||||
return Theme.getColor("toolbar_button_hover")
|
|
||||||
}
|
|
||||||
return Theme.getColor("toolbar_background")
|
|
||||||
}
|
|
||||||
radius: UM.Theme.getSize("default_radius").width
|
|
||||||
|
|
||||||
Rectangle
|
|
||||||
{
|
|
||||||
id: topSquare
|
|
||||||
anchors
|
|
||||||
{
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
top: parent.top
|
|
||||||
}
|
|
||||||
height: parent.radius
|
|
||||||
color: control.isFirstElement ? "transparent" : parent.color
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle
|
|
||||||
{
|
|
||||||
id: bottomSquare
|
|
||||||
anchors
|
|
||||||
{
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
bottom: parent.bottom
|
|
||||||
}
|
|
||||||
height: parent.radius
|
|
||||||
color: control.isLastElement ? "transparent" : parent.color
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle
|
|
||||||
{
|
|
||||||
id: leftSquare
|
|
||||||
anchors
|
|
||||||
{
|
|
||||||
left: parent.left
|
|
||||||
top: parent.top
|
|
||||||
bottom: parent.bottom
|
|
||||||
}
|
|
||||||
width: parent.radius
|
|
||||||
color: parent.color
|
|
||||||
}
|
|
||||||
|
|
||||||
// This is the tooltip
|
|
||||||
UM.PointingRectangle
|
|
||||||
{
|
|
||||||
id: button_tooltip
|
|
||||||
|
|
||||||
anchors.left: parent.right
|
|
||||||
anchors.leftMargin: Theme.getSize("button_tooltip_arrow").width * 2
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
|
|
||||||
target: Qt.point(parent.x, y + Math.round(height/2))
|
|
||||||
arrowSize: Theme.getSize("button_tooltip_arrow").width
|
|
||||||
color: Theme.getColor("button_tooltip")
|
|
||||||
opacity: control.hovered ? 1.0 : 0.0;
|
|
||||||
visible: control.text != ""
|
|
||||||
|
|
||||||
width: control.hovered ? button_tip.width + Theme.getSize("button_tooltip").width : 0
|
|
||||||
height: Theme.getSize("button_tooltip").height
|
|
||||||
|
|
||||||
Behavior on width { NumberAnimation { duration: 100; } }
|
|
||||||
Behavior on opacity { NumberAnimation { duration: 100; } }
|
|
||||||
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
id: button_tip
|
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
|
||||||
|
|
||||||
text: control.text;
|
|
||||||
font: Theme.getFont("button_tooltip");
|
|
||||||
color: Theme.getColor("tooltip_text");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
label: Item
|
|
||||||
{
|
|
||||||
UM.RecolorImage
|
|
||||||
{
|
|
||||||
anchors.centerIn: parent;
|
|
||||||
opacity: !control.enabled ? 0.2 : 1.0
|
|
||||||
source: control.iconSource;
|
|
||||||
width: Theme.getSize("button_icon").width;
|
|
||||||
height: Theme.getSize("button_icon").height;
|
|
||||||
color: Theme.getColor("toolbar_button_text");
|
|
||||||
|
|
||||||
sourceSize: Theme.getSize("button_icon")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
property Component tool_button: Component
|
property Component tool_button: Component
|
||||||
{
|
{
|
||||||
ButtonStyle
|
ButtonStyle
|
||||||
|
Loading…
x
Reference in New Issue
Block a user