mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 06:23:59 -06: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
2 changed files with 30 additions and 2 deletions
|
@ -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")
|
||||
|
|
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…
Add table
Add a link
Reference in a new issue