mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Reorder code for readability
This commit is contained in:
parent
a9ecec0d5c
commit
4f0c24fecb
3 changed files with 14 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2019 Ultimaker B.V.
|
# Copyright (c) 2020 Ultimaker B.V.
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
import re
|
import re
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2020 Ultimaker B.V.
|
||||||
// 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.10
|
import QtQuick 2.10
|
||||||
|
@ -18,6 +18,17 @@ Button
|
||||||
checkable: true
|
checkable: true
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
|
onClicked: Cura.SceneController.changeSelection(index)
|
||||||
|
|
||||||
|
background: Rectangle
|
||||||
|
{
|
||||||
|
id: backgroundRect
|
||||||
|
color: objectItemButton.hovered ? UM.Theme.getColor("action_button_hovered") : "transparent"
|
||||||
|
radius: UM.Theme.getSize("action_button_radius").width
|
||||||
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
|
border.color: objectItemButton.checked ? UM.Theme.getColor("primary") : "transparent"
|
||||||
|
}
|
||||||
|
|
||||||
contentItem: Item
|
contentItem: Item
|
||||||
{
|
{
|
||||||
width: objectItemButton.width - objectItemButton.leftPadding
|
width: objectItemButton.width - objectItemButton.leftPadding
|
||||||
|
@ -126,15 +137,6 @@ Button
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle
|
|
||||||
{
|
|
||||||
id: backgroundRect
|
|
||||||
color: objectItemButton.hovered ? UM.Theme.getColor("action_button_hovered") : "transparent"
|
|
||||||
radius: UM.Theme.getSize("action_button_radius").width
|
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
|
||||||
border.color: objectItemButton.checked ? UM.Theme.getColor("primary") : "transparent"
|
|
||||||
}
|
|
||||||
|
|
||||||
TextMetrics
|
TextMetrics
|
||||||
{
|
{
|
||||||
id: buttonTextMetrics
|
id: buttonTextMetrics
|
||||||
|
@ -151,5 +153,4 @@ Button
|
||||||
visible: objectItemButton.hovered && buttonTextMetrics.elidedText != buttonText.text
|
visible: objectItemButton.hovered && buttonTextMetrics.elidedText != buttonText.text
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: Cura.SceneController.changeSelection(index)
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) 2019 Ultimaker B.V.
|
// Copyright (c) 2020 Ultimaker B.V.
|
||||||
// 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.10
|
import QtQuick 2.10
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue