Merge branch 'ui_rework_4_0' into CURA-5876-Configuration_dropdown

Conflicts:
	plugins/PrepareStage/PrepareMenu.qml: Some indentation change caused it to misalign the diffs, thinking it couldn't merge two of the same lines which actually weren't the same lines.
	resources/qml/Menus/ConfigurationMenu/QuickConfigurationSelector.qml: This file was deleted in my branch. I'm holding for the new version.
This commit is contained in:
Ghostkeeper 2018-11-26 13:43:20 +01:00
commit 826044da7e
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
57 changed files with 1404 additions and 539 deletions

View file

@ -99,6 +99,7 @@ Column
{
id: buttonRow
spacing: UM.Theme.getSize("default_margin").width
width: parent.width
Cura.ActionButton
{

View file

@ -259,6 +259,7 @@ UM.MainWindow
onHideTooltip: base.hideTooltip()
width: UM.Theme.getSize("print_setup_widget").width
height: UM.Theme.getSize("stage_menu").height
headerCornerSide: RoundedRectangle.Direction.Right
}
}

View file

@ -73,7 +73,7 @@ UM.Dialog
{
top: parent.top
left: parent.left
topMargin: UM.Theme.getSize("default_margin")
topMargin: UM.Theme.getSize("default_margin").height
}
text: catalog.i18nc("@title:tab", "Add a printer to Cura")

View file

@ -42,6 +42,12 @@ Item
property alias expandedHighlightColor: expandedHighlight.color
// What should the radius of the header be. This is also influenced by the headerCornerSide
property alias headerRadius: background.radius
// On what side should the header corners be shown? 1 is down, 2 is left, 3 is up and 4 is right.
property alias headerCornerSide: background.cornerSide
function togglePopup()
{
if(popup.visible)
@ -73,7 +79,8 @@ Item
implicitHeight: 100 * screenScaleFactor
implicitWidth: 400 * screenScaleFactor
Rectangle
RoundedRectangle
{
id: background
property real padding: UM.Theme.getSize("default_margin").width

View file

@ -9,8 +9,8 @@ Item
{
id: extruderIconItem
implicitWidth: UM.Theme.getSize("button").width
implicitHeight: implicitWidth
implicitWidth: UM.Theme.getSize("extruder_icon").width
implicitHeight: UM.Theme.getSize("extruder_icon").height
property bool checked: true
property color materialColor
@ -22,7 +22,7 @@ Item
anchors.fill: parent
sourceSize.width: parent.width
sourceSize.height: parent.width
sourceSize.height: parent.height
source: UM.Theme.getIcon("extruder_button")
color: extruderEnabled ? materialColor: "gray"
}
@ -49,10 +49,13 @@ Item
id: extruderNumberText
anchors.centerIn: parent
text: index + 1
font: UM.Theme.getFont("default")
font: UM.Theme.getFont("extruder_icon")
width: contentWidth
height: contentHeight
visible: extruderEnabled
renderType: Text.NativeRendering
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
UM.RecolorImage

View file

@ -2,7 +2,7 @@
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 2.4
import QtQuick.Controls 2.3
import QtQuick.Controls.Styles 1.1
import QtQuick.Layouts 1.1
@ -33,6 +33,7 @@ Cura.ExpandableComponent
elide: Text.ElideRight
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
}
popupItem: Item
@ -60,6 +61,7 @@ Cura.ExpandableComponent
height: visible ? contentHeight + 2 * UM.Theme.getSize("default_margin").height : 0
font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
}
@ -103,6 +105,7 @@ Cura.ExpandableComponent
font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
}
Repeater

View file

@ -182,6 +182,7 @@ Cura.ExpandableComponent
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
elide: Text.ElideRight
color:
{
if(control.pressed)

View file

@ -0,0 +1,49 @@
import QtQuick 2.7
import UM 1.2 as UM
// The rounded rectangle works mostly like a regular rectangle, but provides the option to have rounded corners on only one side of the rectangle.
Item
{
// As per the regular rectangle
property color color: "transparent"
// As per regular rectangle
property int radius: UM.Theme.getSize("default_radius").width
// On what side should the corners be shown 5 can be used if no radius is needed.
// 1 is down, 2 is left, 3 is up and 4 is right.
property int cornerSide: RoundedRectangle.Direction.None
enum Direction
{
None = 0,
Down = 1,
Left = 2,
Up = 3,
Right = 4,
All = 5
}
Rectangle
{
id: background
anchors.fill: parent
radius: cornerSide != RoundedRectangle.Direction.None ? parent.radius : 0
color: parent.color
}
// The item that covers 2 of the corners to make them not rounded.
Rectangle
{
visible: cornerSide != RoundedRectangle.Direction.None && cornerSide != RoundedRectangle.Direction.All
height: cornerSide % 2 ? parent.radius: parent.height
width: cornerSide % 2 ? parent.width : parent.radius
color: parent.color
anchors
{
right: cornerSide == RoundedRectangle.Direction.Left ? parent.right: undefined
bottom: cornerSide == RoundedRectangle.Direction.Up ? parent.bottom: undefined
}
}
}

View file

@ -28,12 +28,16 @@ Item
// Used to create a rounded rectangle behind the toolButtons
Rectangle
{
anchors.fill: toolButtons
anchors.leftMargin: -radius
anchors
{
fill: toolButtons
leftMargin: -radius - border.width
rightMargin: -border.width
topMargin: -border.width
bottomMargin: -border.width
}
radius: UM.Theme.getSize("default_radius").width
border.width: UM.Theme.getSize("default_lining").width
border.color: UM.Theme.getColor("lining")
color: UM.Theme.getColor("toolbar_background")
color: UM.Theme.getColor("lining")
}
Column
@ -42,13 +46,13 @@ Item
anchors.top: parent.top
anchors.right: parent.right
spacing: UM.Theme.getSize("button_lining").width
spacing: UM.Theme.getSize("default_lining").height
Repeater
{
id: repeat
model: UM.ToolModel { }
model: UM.ToolModel { id: toolsModel }
width: childrenRect.width
height: childrenRect.height
Button
@ -60,6 +64,9 @@ Item
enabled: model.enabled && UM.Selection.hasSelection && UM.Controller.toolsEnabled
style: UM.Theme.styles.toolbar_button
property bool isFirstElement: toolsModel.getItem(0).id == model.id
property bool isLastElement: toolsModel.getItem(toolsModel.rowCount() - 1).id == model.id
onCheckedChanged:
{
if (checked)
@ -93,12 +100,16 @@ Item
// Used to create a rounded rectangle behind the extruderButtons
Rectangle
{
anchors.fill: extruderButtons
anchors.leftMargin: -radius
anchors
{
fill: extruderButtons
leftMargin: -radius - border.width
rightMargin: -border.width
topMargin: -border.width
bottomMargin: -border.width
}
radius: UM.Theme.getSize("default_radius").width
border.width: UM.Theme.getSize("default_lining").width
border.color: UM.Theme.getColor("lining")
color: UM.Theme.getColor("toolbar_background")
color: UM.Theme.getColor("lining")
}
Column
@ -108,6 +119,7 @@ Item
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.top: toolButtons.bottom
anchors.right: parent.right
spacing: UM.Theme.getSize("default_lining").height
Repeater
{