123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- // Copyright (c) 2018 Ultimaker B.V.
- // Toolbox is released under the terms of the LGPLv3 or higher.
- import QtQuick 2.2
- import QtQuick.Dialogs 1.1
- import QtQuick.Window 2.2
- import QtQuick.Controls 1.4
- import QtQuick.Controls.Styles 1.4
- import UM 1.1 as UM
- Rectangle {
- width: parent.width
- color: "transparent"
- height: childrenRect.height
- Row
- {
- spacing: 12
- height: childrenRect.height
- width: childrenRect.width
- anchors.left: parent.left
- anchors.leftMargin: UM.Theme.getSize("default_margin").width
- Button
- {
- text: "Plugins"
- style: ButtonStyle
- {
- background: Rectangle
- {
- color: "transparent"
- implicitWidth: 96
- implicitHeight: 48
- Rectangle
- {
- visible: toolbox.viewCategory == "plugin"
- color: UM.Theme.getColor("primary")
- anchors.bottom: parent.bottom
- width: parent.width
- height: 3
- }
- }
- label: Text
- {
- text: control.text
- color: UM.Theme.getColor("text")
- font.pixelSize: 15
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- }
- }
- onClicked:
- {
- toolbox.filterModelByProp("packages", "type", "plugin")
- toolbox.filterModelByProp("authors", "type", "plugin")
- toolbox.viewCategory = "plugin"
- toolbox.viewPage = "overview"
- }
- }
- Button
- {
- text: "Materials"
- style: ButtonStyle
- {
- background: Rectangle
- {
- color: "transparent"
- implicitWidth: 96
- implicitHeight: 48
- Rectangle
- {
- visible: toolbox.viewCategory == "material"
- color: UM.Theme.getColor("primary")
- anchors.bottom: parent.bottom
- width: parent.width
- height: 3
- }
- }
- label: Text
- {
- text: control.text
- color: UM.Theme.getColor("text")
- font.pixelSize: 15
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- }
- }
- onClicked:
- {
- toolbox.filterModelByProp("packages", "type", "material")
- toolbox.filterModelByProp("authors", "type", "material")
- toolbox.viewCategory = "material"
- toolbox.viewPage = "overview"
- }
- }
- }
- Button
- {
- text: "Installed"
- anchors.right: parent.right
- anchors.rightMargin: UM.Theme.getSize("default_margin").width
- style: ButtonStyle
- {
- background: Rectangle
- {
- color: "transparent"
- implicitWidth: 96
- implicitHeight: 48
- Rectangle {
- visible: toolbox.viewCategory == "installed"
- color: UM.Theme.getColor("primary")
- anchors.bottom: parent.bottom
- width: parent.width
- height: 3
- }
- }
- label: Text
- {
- text: control.text
- color: UM.Theme.getColor("text")
- font.pixelSize: 15
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- }
- }
- onClicked: toolbox.viewCategory = "installed"
- }
- }
|