mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 23:15:52 +08:00
Add design for tabs of package type selector
The width here is implementation-defined. Looks like it matches the design though. Seems like the design has 0 margins. Contributes to issue CURA-8557.
This commit is contained in:
parent
38b7f17615
commit
5f884321ea
@ -77,12 +77,14 @@ Window
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
TabButton
|
spacing: 0
|
||||||
|
|
||||||
|
PackageTypeTab
|
||||||
{
|
{
|
||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
text: catalog.i18nc("@button", "Plug-ins")
|
text: catalog.i18nc("@button", "Plug-ins")
|
||||||
}
|
}
|
||||||
TabButton
|
PackageTypeTab
|
||||||
{
|
{
|
||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
text: catalog.i18nc("@button", "Materials")
|
text: catalog.i18nc("@button", "Materials")
|
||||||
|
26
plugins/Marketplace/resources/qml/PackageTypeTab.qml
Normal file
26
plugins/Marketplace/resources/qml/PackageTypeTab.qml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
// Copyright (c) 2021 Ultimaker B.V.
|
||||||
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import UM 1.0 as UM
|
||||||
|
|
||||||
|
TabButton
|
||||||
|
{
|
||||||
|
background: Rectangle
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
color: parent.checked ? UM.Theme.getColor("main_background") : UM.Theme.getColor("detail_background")
|
||||||
|
border.color: UM.Theme.getColor("detail_background")
|
||||||
|
border.width: UM.Theme.getSize("thick_lining").width
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: Label
|
||||||
|
{
|
||||||
|
text: parent.text
|
||||||
|
font: UM.Theme.getFont("medium")
|
||||||
|
color: UM.Theme.getColor("text")
|
||||||
|
width: contentWidth
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user