Add button for toggling the find settings textbox

The toggle is only shown when advanced mode is selected.
This commit is contained in:
fieldOfView 2016-11-21 23:29:18 +01:00
parent 3da5e9de4e
commit 7e4f1dce7b
2 changed files with 41 additions and 1 deletions

View File

@ -214,7 +214,7 @@ Rectangle
anchors.left: parent.left
anchors.leftMargin: model.index * (settingsModeSelection.width / 2)
anchors.verticalCenter: parent.verticalCenter
width: parent.width / 2
width: 0.5 * parent.width - (index == 1 ? toggleFilterButton.width : 0)
text: model.text
exclusiveGroup: modeMenuGroup;
checkable: true;
@ -256,6 +256,42 @@ Rectangle
}
}
Button
{
id: toggleFilterButton
anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("default_margin").width
anchors.top: headerSeparator.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height
height: settingsModeSelection.height
width: visible ? height : 0
visible: !monitoringPrint && base.currentModeIndex == 1
opacity: visible ? 1 : 0
style: ButtonStyle
{
background: Rectangle
{
border.width: UM.Theme.getSize("default_lining").width
border.color: UM.Theme.getColor("toggle_checked_border")
color: visible ? UM.Theme.getColor("toggle_checked") : UM.Theme.getColor("toggle_hovered")
Behavior on color { ColorAnimation { duration: 50; } }
}
label: UM.RecolorImage
{
anchors.verticalCenter: control.verticalCenter
anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("default_margin").width / 2
source: UM.Theme.getIcon("search")
color: UM.Theme.getColor("toggle_checked_text")
}
}
}
Label {
id: monitorLabel
text: catalog.i18nc("@label","Printer Monitor");

View File

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
<path
d="m 20.769231,12.692308 q 0,-3.3353368 -2.370794,-5.7061301 -2.370793,-2.3707933 -5.706129,-2.3707933 -3.335337,0 -5.70613,2.3707933 -2.370793,2.3707933 -2.370793,5.7061301 0,3.335336 2.370793,5.706129 2.370793,2.370794 5.70613,2.370794 3.335336,0 5.706129,-2.370794 2.370794,-2.370793 2.370794,-5.706129 z m 9.230769,15 q 0,0.9375 -0.685096,1.622596 Q 28.629808,30 27.692308,30 26.71875,30 26.069712,29.314904 l -6.183895,-6.165866 q -3.227163,2.235577 -7.193509,2.235577 -2.578125,0 -4.93089,-1.000601 Q 5.408654,23.383413 3.704928,21.679687 2.001202,19.975962 1.000601,17.623197 0,15.270433 0,12.692308 0,10.114183 1.000601,7.7614183 2.001202,5.4086538 3.704928,3.7049279 5.408654,2.0012019 7.761418,1.000601 10.114183,0 12.692308,0 q 2.578125,0 4.930889,1.000601 2.352765,1.0006009 4.05649,2.7043269 1.703726,1.7037259 2.704327,4.0564904 1.000601,2.3527647 1.000601,4.9308897 0,3.966346 -2.235577,7.193509 l 6.183895,6.183895 Q 30,26.736779 30,27.692308 Z" />
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB