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:
Ghostkeeper 2021-10-28 18:08:51 +02:00
parent 38b7f17615
commit 5f884321ea
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
2 changed files with 30 additions and 2 deletions

View file

@ -77,12 +77,14 @@ Window
anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("default_margin").width
TabButton
spacing: 0
PackageTypeTab
{
width: implicitWidth
text: catalog.i18nc("@button", "Plug-ins")
}
TabButton
PackageTypeTab
{
width: implicitWidth
text: catalog.i18nc("@button", "Materials")

View 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
}
}