mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-17 01:06:00 +08:00
Merge branch 'marketplace_navigation_improvements' of github.com:Ultimaker/Cura into marketplace_redesign
This commit is contained in:
commit
71769ab168
@ -7,17 +7,21 @@ import Cura 1.6 as Cura
|
|||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
|
|
||||||
Button
|
TabButton
|
||||||
{
|
{
|
||||||
id: root
|
id: root
|
||||||
width: UM.Theme.getSize("button_icon").width
|
width: UM.Theme.getSize("button_icon").width+UM.Theme.getSize("narrow_margin").width
|
||||||
height: UM.Theme.getSize("button_icon").height
|
height: UM.Theme.getSize("button_icon").height
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
property color backgroundColor: hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
|
property color inactiveBackgroundColor : hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("detail_background")
|
||||||
|
property color activeBackgroundColor : UM.Theme.getColor("main_background")
|
||||||
|
leftInset: UM.Theme.getSize("narrow_margin").width
|
||||||
|
|
||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
color: backgroundColor
|
color: parent.checked ? activeBackgroundColor : inactiveBackgroundColor
|
||||||
|
border.color: parent.checked ? UM.Theme.getColor("detail_background") : "transparent"
|
||||||
|
border.width: UM.Theme.getSize("thick_lining").width
|
||||||
radius: Math.round(width * 0.5)
|
radius: Math.round(width * 0.5)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,7 +42,8 @@ Button
|
|||||||
|
|
||||||
color: UM.Theme.getColor("icon")
|
color: UM.Theme.getColor("icon")
|
||||||
source: UM.Theme.getIcon("Settings")
|
source: UM.Theme.getIcon("Settings")
|
||||||
anchors.centerIn: parent
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.horizontalCenterOffset: Math.round(UM.Theme.getSize("narrow_margin").width /2)
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,15 +102,14 @@ Window
|
|||||||
TabBar
|
TabBar
|
||||||
{
|
{
|
||||||
id: pageSelectionTabBar
|
id: pageSelectionTabBar
|
||||||
height: parent.height
|
anchors.right: parent.right
|
||||||
width: implicitWidth
|
height: UM.Theme.getSize("button_icon").height
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
PackageTypeTab
|
PackageTypeTab
|
||||||
{
|
{
|
||||||
id: pluginTabText
|
id: pluginTabText
|
||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
padding: UM.Theme.getSize("thin_margin").width
|
|
||||||
text: catalog.i18nc("@button", "Plugins")
|
text: catalog.i18nc("@button", "Plugins")
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
@ -123,7 +122,6 @@ Window
|
|||||||
{
|
{
|
||||||
id: materialsTabText
|
id: materialsTabText
|
||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
padding: UM.Theme.getSize("thin_margin").width
|
|
||||||
text: catalog.i18nc("@button", "Materials")
|
text: catalog.i18nc("@button", "Materials")
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
@ -132,7 +130,12 @@ Window
|
|||||||
content.source = "Materials.qml"
|
content.source = "Materials.qml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ManagePackagesButton
|
||||||
|
{
|
||||||
|
onClicked: content.source = "ManagedPackages.qml"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextMetrics
|
TextMetrics
|
||||||
{
|
{
|
||||||
id: pluginTabTextMetrics
|
id: pluginTabTextMetrics
|
||||||
@ -144,21 +147,7 @@ Window
|
|||||||
id: materialsTabTextMetrics
|
id: materialsTabTextMetrics
|
||||||
text: materialsTabText.text
|
text: materialsTabText.text
|
||||||
font: materialsTabText.font
|
font: materialsTabText.font
|
||||||
}
|
}
|
||||||
|
|
||||||
ManagePackagesButton
|
|
||||||
{
|
|
||||||
id: managePackagesButton
|
|
||||||
height: parent.height
|
|
||||||
width: UM.Theme.getSize("button_icon").width
|
|
||||||
|
|
||||||
onClicked:
|
|
||||||
{
|
|
||||||
searchBar.text = ""
|
|
||||||
searchBar.visible = false
|
|
||||||
content.source = "ManagedPackages.qml"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,11 +8,16 @@ import UM 1.0 as UM
|
|||||||
TabButton
|
TabButton
|
||||||
{
|
{
|
||||||
property string pageTitle
|
property string pageTitle
|
||||||
|
padding: UM.Theme.getSize("narrow_margin").width
|
||||||
|
horizontalPadding: UM.Theme.getSize("default_margin").width
|
||||||
|
hoverEnabled: true
|
||||||
|
property color inactiveBackgroundColor : hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("detail_background")
|
||||||
|
property color activeBackgroundColor : UM.Theme.getColor("main_background")
|
||||||
|
|
||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: parent.checked ? UM.Theme.getColor("main_background") : UM.Theme.getColor("detail_background")
|
color: parent.checked ? activeBackgroundColor : inactiveBackgroundColor
|
||||||
border.color: UM.Theme.getColor("detail_background")
|
border.color: UM.Theme.getColor("detail_background")
|
||||||
border.width: UM.Theme.getSize("thick_lining").width
|
border.width: UM.Theme.getSize("thick_lining").width
|
||||||
}
|
}
|
||||||
@ -20,7 +25,7 @@ TabButton
|
|||||||
contentItem: Label
|
contentItem: Label
|
||||||
{
|
{
|
||||||
text: parent.text
|
text: parent.text
|
||||||
font: UM.Theme.getFont("medium")
|
font: UM.Theme.getFont("medium_bold")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
width: contentWidth
|
width: contentWidth
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user