Add the callout panel to the account panel, with the two components that

will show up when the user is logged in or when not.

Contributes to CURA-5784.
This commit is contained in:
Diego Prado Gesto 2018-10-09 15:58:13 +02:00
parent 2ffcf03f43
commit 77a1b08f38
9 changed files with 143 additions and 15 deletions

View file

@ -9,7 +9,7 @@ import QtQuick.Layouts 1.1
import UM 1.4 as UM
import Cura 1.0 as Cura
import "components"
import "../components"
// This item contains the views selector, a combobox that is dinamically created from
// the list of available Views (packages that create different visualizactions of the

View file

@ -8,7 +8,7 @@ import QtQuick.Controls.Styles 1.1
import UM 1.4 as UM
import Cura 1.0 as Cura
import "components"
import "../Accounts"
Rectangle
{

View file

@ -1,71 +0,0 @@
// Copyright (c) 2018 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 1.1
import UM 1.4 as UM
Item
{
id: base
height: UM.Theme.getSize("topheader").height
width: UM.Theme.getSize("topheader").height
AvatarImage
{
id: avatar
width: Math.round(0.8 * parent.width)
height: Math.round(0.8 * parent.height)
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
}
MouseArea
{
anchors.fill: avatar
onClicked:
{
// Collapse/Expand the dropdown panel
accountManagementPanel.visible = !accountManagementPanel.visible
}
}
UM.PointingRectangle
{
id: accountManagementPanel
width: 250
height: 250
anchors
{
top: parent.bottom
topMargin: UM.Theme.getSize("default_margin").height
right: parent.right
}
target: Qt.point(parent.width / 2, parent.bottom)
arrowSize: UM.Theme.getSize("default_arrow").width
visible: false
opacity: visible ? 1 : 0
Behavior on opacity { NumberAnimation { duration: 100 } }
color: UM.Theme.getColor("tool_panel_background")
borderColor: UM.Theme.getColor("lining")
borderWidth: UM.Theme.getSize("default_lining").width
Loader
{
id: panel
sourceComponent: login
}
}
Component
{
id: login
Label {text: "HOLA"}
}
}

View file

@ -1,42 +0,0 @@
// Copyright (c) 2018 Ultimaker B.V.
import QtQuick 2.7
import QtQuick.Controls 2.1
import QtGraphicalEffects 1.0
import UM 1.4 as UM
Item
{
id: avatar
Image
{
id: profileImage
source: UM.Theme.getImage("avatar_default")
sourceSize: Qt.size(parent.width, parent.height)
width: parent.width
height: parent.height
fillMode: Image.PreserveAspectCrop
visible: false
}
UM.RecolorImage
{
id: profileImageMask
source: UM.Theme.getIcon("circle_mask")
sourceSize: Qt.size(parent.width, parent.height)
width: parent.width
height: parent.height
color: UM.Theme.getColor("topheader_background")
visible: false
}
OpacityMask
{
anchors.fill: profileImage
source: profileImage
maskSource: profileImageMask
cached: true
invert: false
}
}

View file

@ -1,56 +0,0 @@
// Copyright (c) 2018 Ultimaker B.V.
// Cura 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 UM 1.4 as UM
// View orientation Item
Row
{
id: viewOrientationControl
spacing: 2 * screenScaleFactor
// #1 3d view
Button
{
iconSource: UM.Theme.getIcon("view_3d")
style: UM.Theme.styles.small_tool_button
onClicked:UM.Controller.rotateView("3d", 0)
}
// #2 Front view
Button
{
iconSource: UM.Theme.getIcon("view_front")
style: UM.Theme.styles.small_tool_button
onClicked: UM.Controller.rotateView("home", 0)
}
// #3 Top view
Button
{
iconSource: UM.Theme.getIcon("view_top")
style: UM.Theme.styles.small_tool_button
onClicked: UM.Controller.rotateView("y", 90)
}
// #4 Left view
Button
{
iconSource: UM.Theme.getIcon("view_left")
style: UM.Theme.styles.small_tool_button
onClicked: UM.Controller.rotateView("x", 90)
}
// #5 Right view
Button
{
iconSource: UM.Theme.getIcon("view_right")
style: UM.Theme.styles.small_tool_button
onClicked: UM.Controller.rotateView("x", -90)
}
}