Merge branch 'CURA-8421_Introduce_app_switcher' into CURA-8422_add_platform_links

This commit is contained in:
Konstantinos Karmas 2021-09-21 11:35:02 +02:00
commit cd505d575d
7 changed files with 33 additions and 33 deletions

View file

@ -11,13 +11,12 @@ import Cura 1.1 as Cura
Item
{
id: applicationSwitcherWidget
width: appSwitcherButton.width
width: applicationSwitcherButton.width
height: width
Button
{
id: appSwitcherButton
id: applicationSwitcherButton
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
@ -26,29 +25,29 @@ Item
background: UM.RecolorImage
{
width: UM.Theme.getSize("small_button_icon").width
width: parent.width
height: width
anchors.verticalCenter: appSwitcherButton.verticalCenter
anchors.horizontalCenter: appSwitcherButton.horizontalCenter
anchors.verticalCenter: applicationSwitcherButton.verticalCenter
anchors.horizontalCenter: applicationSwitcherButton.horizontalCenter
color: UM.Theme.getColor("main_background")
source: UM.Theme.getIcon("ApplicationSwitcher")
source: UM.Theme.getIcon("BlockGrid")
}
onClicked:
{
if (popup.opened)
if (applicationSwitcherPopup.opened)
{
popup.close()
applicationSwitcherPopup.close()
} else {
popup.open()
applicationSwitcherPopup.open()
}
}
}
Popup
{
id: popup
id: applicationSwitcherPopup
y: parent.height + UM.Theme.getSize("default_arrow").height
x: parent.width - width
@ -63,7 +62,7 @@ Item
contentItem: Item
{
id: projectListContainer
id: applicationsContainer
anchors.fill: parent
anchors.margins: UM.Theme.getSize("wide_margin").width
@ -73,17 +72,16 @@ Item
anchors.top: parent.top
anchors.left: parent.left
width: gridLayout.width
width: ultimakerPlatformLinksGrid.width
Grid
{
id: gridLayout
id: ultimakerPlatformLinksGrid
columns: 3
spacing: UM.Theme.getSize("default_margin").width
Repeater
{
id:gridgenerate
model:
[
{
@ -147,7 +145,7 @@ Item
displayName: modelData.displayName
iconSource: modelData.thumbnail
tooltipText: modelData.description
isExternalLink: (index % 2 == 0)
isExternalLink: true
onClicked: Qt.openUrlExternally(modelData.link)
}
@ -163,7 +161,7 @@ Item
borderColor: UM.Theme.getColor("lining")
borderWidth: UM.Theme.getSize("default_lining").width
target: Qt.point(width - (appSwitcherButton.width / 2), -10)
target: Qt.point(width - (applicationSwitcherButton.width / 2), -10)
arrowSize: UM.Theme.getSize("default_arrow").width
}