Make header tab button color stylable
The monitor tab icon is split up in a base monitor tab icon and a status overlay, each with their own color.
|
@ -175,6 +175,9 @@ Rectangle
|
|||
height: UM.Theme.getSize("sidebar_header").height
|
||||
onClicked: monitoringPrint = false
|
||||
iconSource: UM.Theme.getIcon("tab_settings");
|
||||
property color overlayColor: "transparent"
|
||||
property string overlayIconSource: ""
|
||||
|
||||
checkable: true
|
||||
checked: !monitoringPrint
|
||||
exclusiveGroup: sidebarHeaderBarGroup
|
||||
|
@ -203,9 +206,34 @@ Rectangle
|
|||
width: height
|
||||
height: UM.Theme.getSize("sidebar_header").height
|
||||
onClicked: monitoringPrint = true
|
||||
iconSource: {
|
||||
iconSource: printerConnected ? UM.Theme.getIcon("tab_monitor_with_status") : UM.Theme.getIcon("tab_monitor")
|
||||
property color overlayColor:
|
||||
{
|
||||
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
|
||||
{
|
||||
case "printing":
|
||||
case "pre_print":
|
||||
case "wait_cleanup":
|
||||
case "pausing":
|
||||
case "resuming":
|
||||
return UM.Theme.getColor("status_busy");
|
||||
case "ready":
|
||||
case "":
|
||||
return UM.Theme.getColor("status_ready");
|
||||
case "paused":
|
||||
return UM.Theme.getColor("status_paused");
|
||||
case "error":
|
||||
return UM.Theme.getColor("status_stopped");
|
||||
case "offline":
|
||||
return UM.Theme.getColor("status_offline");
|
||||
default:
|
||||
return UM.Theme.getColor("text_reversed");
|
||||
}
|
||||
}
|
||||
property string overlayIconSource:
|
||||
{
|
||||
if(!printerConnected)
|
||||
return UM.Theme.getIcon("tab_monitor");
|
||||
return "";
|
||||
else if(!printerAcceptsCommands)
|
||||
return UM.Theme.getIcon("tab_monitor_unknown");
|
||||
|
||||
|
@ -233,6 +261,7 @@ Rectangle
|
|||
return UM.Theme.getIcon("tab_monitor")
|
||||
}
|
||||
}
|
||||
|
||||
checkable: true
|
||||
checked: monitoringPrint
|
||||
exclusiveGroup: sidebarHeaderBarGroup
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
|
||||
<path d="M2.5 2.5h25v1.19h-25V2.5zm0 23.81h2.287l2.272-1.19h15.966l2.234 1.19H27.5v1.19h-2.239l-2.236-1.19H7.057l-2.27 1.177L2.5 27.5v-1.19zM26.364 3.69H27.5v22.62h-1.136V3.69zM2.5 3.69h1.136v22.62H2.5V3.69zm3.41 2.381h18.18v16.667H5.91V6.071zm1.135 1.19h15.91v14.287H7.045V7.262zm5.682 0h4.546v3.572h-4.546V7.262zM9.318 20.358h11.364v1.19H9.318v-1.19zm4.546-9.524h2.272v1.19h-2.272v-1.19z" fill="#fff" fill-rule="evenodd"/>
|
||||
<path d="M2.5 2.5h25v1.19h-25V2.5zm0 23.81h2.287l2.272-1.19h15.966l2.234 1.19H27.5v1.19h-2.239l-2.236-1.19H7.057l-2.27 1.177L2.5 27.5v-1.19zM26.364 3.69H27.5v22.62h-1.136V3.69zM2.5 3.69h1.136v22.62H2.5V3.69zm3.41 2.381h18.18v16.667H5.91V6.071zm1.135 1.19h15.91v14.287H7.045V7.262zm5.682 0h4.546v3.572h-4.546V7.262zM9.318 20.358h11.364v1.19H9.318v-1.19zm4.546-9.524h2.272v1.19h-2.272v-1.19z" fill-rule="evenodd"/>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 485 B |
|
@ -1,7 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
|
||||
<path d="M2.5 2.5h25v1.19h-25V2.5zm0 23.81h2.287l2.272-1.19h15.966l2.234 1.19H27.5v1.19h-2.239l-2.236-1.19H7.057l-2.27 1.177L2.5 27.5v-1.19zM26.364 3.69H27.5v22.62h-1.136V3.69zM2.5 3.69h1.136v22.62H2.5V3.69zm3.41 2.381h18.18v16.667H5.91V6.071zm1.135 1.19h15.91v14.287H7.045V7.262zm5.682 0h4.546v3.572h-4.546V7.262zM9.318 20.358h11.364v1.19H9.318v-1.19zm4.546-9.524h2.272v1.19h-2.272v-1.19z" fill="#fff" fill-rule="evenodd"/>
|
||||
<circle cx="22.5" cy="7.5" r="7.5" fill="#0ca9e3"/>
|
||||
<circle cx="22.5" cy="7.5" r="1.5" fill="#fff"/>
|
||||
<circle r="1.5" cy="7.5" cx="18.5" fill="#fff"/>
|
||||
<circle cx="26.5" cy="7.5" r="1.5" fill="#fff"/>
|
||||
<path
|
||||
d="M 22.5 0 A 7.5 7.5 0 0 0 15 7.5 A 7.5 7.5 0 0 0 22.5 15 A 7.5 7.5 0 0 0 30 7.5 A 7.5 7.5 0 0 0 22.5 0 z M 18.5 6 A 1.5 1.5 0 0 1 20 7.5 A 1.5 1.5 0 0 1 18.5 9 A 1.5 1.5 0 0 1 17 7.5 A 1.5 1.5 0 0 1 18.5 6 z M 22.5 6 A 1.5 1.5 0 0 1 24 7.5 A 1.5 1.5 0 0 1 22.5 9 A 1.5 1.5 0 0 1 21 7.5 A 1.5 1.5 0 0 1 22.5 6 z M 26.5 6 A 1.5 1.5 0 0 1 28 7.5 A 1.5 1.5 0 0 1 26.5 9 A 1.5 1.5 0 0 1 25 7.5 A 1.5 1.5 0 0 1 26.5 6 z " />
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 712 B After Width: | Height: | Size: 502 B |
|
@ -1,5 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
|
||||
<path d="M2.5 2.5h25v1.19h-25V2.5zm0 23.81h2.287l2.272-1.19h15.966l2.234 1.19H27.5v1.19h-2.239l-2.236-1.19H7.057l-2.27 1.177L2.5 27.5v-1.19zM26.364 3.69H27.5v22.62h-1.136V3.69zM2.5 3.69h1.136v22.62H2.5V3.69zm3.41 2.381h18.18v16.667H5.91V6.071zm1.135 1.19h15.91v14.287H7.045V7.262zm5.682 0h4.546v3.572h-4.546V7.262zM9.318 20.358h11.364v1.19H9.318v-1.19zm4.546-9.524h2.272v1.19h-2.272v-1.19z" fill="#fff" fill-rule="evenodd"/>
|
||||
<circle cx="22.5" cy="7.5" r="7.5" fill="#00cd00"/>
|
||||
<path d="M25.547 4.302L21.994 7.92 19.86 5.84 18.5 7.218l3.572 3.48c1.66-1.68 3.447-3.513 4.903-4.996z" fill="#fff"/>
|
||||
<path
|
||||
d="M 22.5 0 A 7.5 7.5 0 0 0 15 7.5 A 7.5 7.5 0 0 0 22.5 15 A 7.5 7.5 0 0 0 30 7.5 A 7.5 7.5 0 0 0 22.5 0 z M 25.546875 4.3027344 L 26.974609 5.7011719 C 25.518609 7.1841719 23.732266 9.0172656 22.072266 10.697266 L 18.5 7.21875 L 19.859375 5.8398438 L 21.994141 7.9199219 L 25.546875 4.3027344 z " />
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 675 B After Width: | Height: | Size: 382 B |
|
@ -1,5 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
|
||||
<path d="M2.5 2.5h25v1.19h-25V2.5zm0 23.81h2.287l2.272-1.19h15.966l2.234 1.19H27.5v1.19h-2.239l-2.236-1.19H7.057l-2.27 1.177L2.5 27.5v-1.19zM26.364 3.69H27.5v22.62h-1.136V3.69zM2.5 3.69h1.136v22.62H2.5V3.69zm3.41 2.381h18.18v16.667H5.91V6.071zm1.135 1.19h15.91v14.287H7.045V7.262zm5.682 0h4.546v3.572h-4.546V7.262zM9.318 20.358h11.364v1.19H9.318v-1.19zm4.546-9.524h2.272v1.19h-2.272v-1.19z" fill="#fff" fill-rule="evenodd"/>
|
||||
<circle cx="22.5" cy="7.5" r="7.5"/>
|
||||
<path d="M20.025 3.611l-1.414 1.414L21.086 7.5 18.61 9.975l1.414 1.414L22.5 8.914l2.475 2.475 1.414-1.414L23.914 7.5l2.475-2.475-1.414-1.414L22.5 6.086 20.025 3.61z" fill="#fff"/>
|
||||
<path
|
||||
d="M 22.5 0 A 7.5 7.5 0 0 0 15 7.5 A 7.5 7.5 0 0 0 22.5 15 A 7.5 7.5 0 0 0 30 7.5 A 7.5 7.5 0 0 0 22.5 0 z M 20.025391 3.6113281 L 22.5 6.0859375 L 24.974609 3.6113281 L 26.388672 5.0253906 L 23.914062 7.5 L 26.388672 9.9746094 L 24.974609 11.388672 L 22.5 8.9140625 L 20.023438 11.388672 L 18.609375 9.9746094 L 21.085938 7.5 L 18.611328 5.0253906 L 20.025391 3.6113281 z " />
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 722 B After Width: | Height: | Size: 459 B |
|
@ -1,5 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
|
||||
<path d="M2.5 2.5h25v1.19h-25V2.5zm0 23.81h2.287l2.272-1.19h15.966l2.234 1.19H27.5v1.19h-2.239l-2.236-1.19H7.057l-2.27 1.177L2.5 27.5v-1.19zM26.364 3.69H27.5v22.62h-1.136V3.69zM2.5 3.69h1.136v22.62H2.5V3.69zm3.41 2.381h18.18v16.667H5.91V6.071zm1.135 1.19h15.91v14.287H7.045V7.262zm5.682 0h4.546v3.572h-4.546V7.262zM9.318 20.358h11.364v1.19H9.318v-1.19zm4.546-9.524h2.272v1.19h-2.272v-1.19z" fill="#fff" fill-rule="evenodd"/>
|
||||
<circle cx="22.5" cy="7.5" r="7.5" fill="#ff8c00"/>
|
||||
<path fill="#fff" d="M19.5 4h2v7h-2zm4 0h2v7h-2z"/>
|
||||
<path
|
||||
d="M 22.5 0 A 7.5 7.5 0 0 0 15 7.5 A 7.5 7.5 0 0 0 22.5 15 A 7.5 7.5 0 0 0 30 7.5 A 7.5 7.5 0 0 0 22.5 0 z M 19.5 4 L 21.5 4 L 21.5 11 L 19.5 11 L 19.5 4 z M 23.5 4 L 25.5 4 L 25.5 11 L 23.5 11 L 23.5 4 z " />
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 609 B After Width: | Height: | Size: 291 B |
|
@ -1,5 +1,51 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
|
||||
<path d="M2.5 2.5h25v1.19h-25V2.5zm0 23.81h2.287l2.272-1.19h15.966l2.234 1.19H27.5v1.19h-2.239l-2.236-1.19H7.057l-2.27 1.177L2.5 27.5v-1.19zM26.364 3.69H27.5v22.62h-1.136V3.69zM2.5 3.69h1.136v22.62H2.5V3.69zm3.41 2.381h18.18v16.667H5.91V6.071zm1.135 1.19h15.91v14.287H7.045V7.262zm5.682 0h4.546v3.572h-4.546V7.262zM9.318 20.358h11.364v1.19H9.318v-1.19zm4.546-9.524h2.272v1.19h-2.272v-1.19z" fill="#fff" fill-rule="evenodd"/>
|
||||
<circle cx="22.5" cy="7.5" r="7.5" fill="#ec5250"/>
|
||||
<path d="M20.025 3.611l-1.414 1.414L21.086 7.5 18.61 9.975l1.414 1.414L22.5 8.914l2.475 2.475 1.414-1.414L23.914 7.5l2.475-2.475-1.414-1.414L22.5 6.086 20.025 3.61z" fill="#fff"/>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg3753"
|
||||
sodipodi:docname="tab_monitor_stopped.svg"
|
||||
inkscape:version="0.92.0 r15299">
|
||||
<metadata
|
||||
id="metadata3759">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs3757" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="640"
|
||||
inkscape:window-height="480"
|
||||
id="namedview3755"
|
||||
showgrid="false"
|
||||
inkscape:zoom="7.8666667"
|
||||
inkscape:cx="15"
|
||||
inkscape:cy="15"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg3753" />
|
||||
<path
|
||||
d="M 22.5 0 A 7.5 7.5 0 0 0 15 7.5 A 7.5 7.5 0 0 0 22.5 15 A 7.5 7.5 0 0 0 30 7.5 A 7.5 7.5 0 0 0 22.5 0 z M 20.025391 3.6113281 L 22.5 6.0859375 L 24.974609 3.6113281 L 26.388672 5.0253906 L 23.914062 7.5 L 26.388672 9.9746094 L 24.974609 11.388672 L 22.5 8.9140625 L 20.023438 11.388672 L 18.609375 9.9746094 L 21.085938 7.5 L 18.611328 5.0253906 L 20.025391 3.6113281 z "
|
||||
id="circle3749" />
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 737 B After Width: | Height: | Size: 1.8 KiB |
|
@ -1,5 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
|
||||
<path d="M2.5 2.5h25v1.19h-25V2.5zm0 23.81h2.287l2.272-1.19h15.966l2.234 1.19H27.5v1.19h-2.239l-2.236-1.19H7.057l-2.27 1.177L2.5 27.5v-1.19zM26.364 3.69H27.5v22.62h-1.136V3.69zM2.5 3.69h1.136v22.62H2.5V3.69zm3.41 2.381h18.18v16.667H5.91V6.071zm1.135 1.19h15.91v14.287H7.045V7.262zm5.682 0h4.546v3.572h-4.546V7.262zM9.318 20.358h11.364v1.19H9.318v-1.19zm4.546-9.524h2.272v1.19h-2.272v-1.19z" fill="#fff" fill-rule="evenodd"/>
|
||||
<circle cx="22.5" cy="7.5" r="7.5" fill="#7f7f7f"/>
|
||||
<path d="M25.538 5.675q0 .532-.158.943-.153.405-.437.706-.285.3-.685.537-.395.237-.895.432v1.2h-1.854V7.718q.374-.1.674-.205.305-.105.637-.342.31-.21.485-.49.179-.28.179-.632 0-.527-.343-.748-.337-.226-.953-.226-.38 0-.858.163-.474.163-.87.421h-.21V4.053q.337-.142 1.038-.295.7-.158 1.422-.158 1.3 0 2.064.574t.764 1.501zM23.51 11.6h-2.128v-1.39h2.128v1.39z" style="-inkscape-font-specification:'Verdana Bold'" font-weight="700" font-family="Verdana" fill="#fff" font-size="10.786" letter-spacing="0" word-spacing="0"/>
|
||||
<path
|
||||
d="M 22.5 0 A 7.5 7.5 0 0 0 15 7.5 A 7.5 7.5 0 0 0 22.5 15 A 7.5 7.5 0 0 0 30 7.5 A 7.5 7.5 0 0 0 22.5 0 z M 22.710938 3.5996094 C 23.577604 3.5996094 24.264104 3.7911615 24.773438 4.1738281 C 25.282771 4.5564948 25.537109 5.0577813 25.537109 5.6757812 C 25.537109 6.0304479 25.486193 6.3431875 25.380859 6.6171875 C 25.278859 6.8871875 25.132693 7.1235521 24.943359 7.3242188 C 24.753359 7.5242188 24.524479 7.7033281 24.257812 7.8613281 C 23.994479 8.0193281 23.696615 8.1629687 23.363281 8.2929688 L 23.363281 9.4921875 L 21.509766 9.4921875 L 21.509766 7.71875 C 21.759099 7.6520833 21.983594 7.5836719 22.183594 7.5136719 C 22.386927 7.4436719 22.598979 7.329875 22.820312 7.171875 C 23.026979 7.031875 23.188021 6.8683073 23.304688 6.6816406 C 23.424021 6.494974 23.484375 6.2834948 23.484375 6.0488281 C 23.484375 5.6974948 23.369292 5.4481146 23.140625 5.3007812 C 22.915958 5.1501146 22.598167 5.0742187 22.1875 5.0742188 C 21.934167 5.0742188 21.648745 5.1296146 21.330078 5.2382812 C 21.014078 5.3469479 20.724937 5.4862031 20.460938 5.6582031 L 20.25 5.6582031 L 20.25 4.0527344 C 20.474667 3.9580677 20.819776 3.8598125 21.287109 3.7578125 C 21.753776 3.6524792 22.229604 3.5996094 22.710938 3.5996094 z M 21.382812 10.210938 L 23.509766 10.210938 L 23.509766 11.599609 L 21.382812 11.599609 L 21.382812 10.210938 z " />
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.4 KiB |
4
resources/themes/cura/icons/tab_monitor_with_status.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
|
||||
<path d="M2.5 2.5h25v1.19h-25V2.5zm0 23.81h2.287l2.272-1.19h15.966l2.234 1.19H27.5v1.19h-2.239l-2.236-1.19H7.057l-2.27 1.177L2.5 27.5v-1.19zM26.364 3.69H27.5v22.62h-1.136V3.69zM2.5 3.69h1.136v22.62H2.5V3.69zm3.41 2.381h18.18v16.667H5.91V6.071zm1.135 1.19h15.91v14.287H7.045V7.262zm5.682 0h4.546v3.572h-4.546V7.262zM9.318 20.358h11.364v1.19H9.318v-1.19zm4.546-9.524h2.272v1.19h-2.272v-1.19z" fill-rule="evenodd"/>
|
||||
<circle cx="22.5" cy="7.5" r="7.4" />
|
||||
</svg>
|
After Width: | Height: | Size: 527 B |
|
@ -100,12 +100,24 @@ QtObject {
|
|||
}
|
||||
|
||||
label: Item {
|
||||
Image {
|
||||
anchors.centerIn: parent;
|
||||
UM.RecolorImage {
|
||||
color: UM.Theme.getColor("text_reversed")
|
||||
anchors.centerIn: parent
|
||||
opacity: !control.enabled ? 0.2 : 1.0
|
||||
source: control.iconSource;
|
||||
width: Theme.getSize("button_icon").width;
|
||||
height: Theme.getSize("button_icon").height;
|
||||
source: control.iconSource
|
||||
width: Theme.getSize("button_icon").width
|
||||
height: Theme.getSize("button_icon").height
|
||||
|
||||
sourceSize: Theme.getSize("button_icon")
|
||||
}
|
||||
UM.RecolorImage {
|
||||
visible: control.overlayIconSource != ""
|
||||
color: control.overlayColor
|
||||
anchors.centerIn: parent
|
||||
opacity: !control.enabled ? 0.2 : 1.0
|
||||
source: control.overlayIconSource
|
||||
width: Theme.getSize("button_icon").width
|
||||
height: Theme.getSize("button_icon").height
|
||||
|
||||
sourceSize: Theme.getSize("button_icon")
|
||||
}
|
||||
|
|