Browse Source

Added icon to the search field which filters settings
CURA-5941

Aleksei S 6 years ago
parent
commit
73568d7473

+ 2 - 2
resources/qml/Settings/SettingView.qml

@@ -105,12 +105,12 @@ Item
             anchors.right: clearFilterButton.left
             anchors.rightMargin: Math.round(UM.Theme.getSize("thick_margin").width)
 
-            placeholderText: catalog.i18nc("@label:textbox", "Search...")
+            placeholderText: "<img align='middle'  src='"+ UM.Theme.getIcon("search") +"'>" +  "<div vertical-align=bottom>" + catalog.i18nc("@label:textbox", "search settings")
 
             style: TextFieldStyle
             {
                 textColor: UM.Theme.getColor("setting_control_text");
-                placeholderTextColor: UM.Theme.getColor("setting_control_text")
+                placeholderTextColor: UM.Theme.getColor("setting_filter_field")
                 font: UM.Theme.getFont("default");
                 background: Item {}
             }

+ 21 - 4
resources/themes/cura-light/icons/search.svg

@@ -1,4 +1,21 @@
-<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>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <!-- Generator: Sketch 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
+    <title>Shape</title>
+    <desc>Created with Sketch.</desc>
+    <g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="Panel/-Print-settings-custom" transform="translate(-32.000000, -157.000000)" fill="#999999" fill-rule="nonzero">
+            <g id="Print-settings">
+                <g id="noun_Search_860389">
+                    <g transform="translate(32.000000, 157.000000)">
+                        <g id="Group">
+                            <g id="Shape">
+                                <path d="M10.2242373,9.21452652 L13.7917958,12.782085 C14.0693364,13.0596257 14.07024,13.5087044 13.7894722,13.7894722 C13.5106483,14.0682962 13.0545722,14.064283 12.782085,13.7917958 L9.21452652,10.2242373 C6.97377165,11.9681155 3.73256035,11.8102461 1.67294351,9.75062929 C-0.557647836,7.52003797 -0.557647836,3.90353485 1.67294351,1.67294351 C3.90353485,-0.557647836 7.52003797,-0.557647836 9.75062929,1.67294351 C11.8102461,3.73256035 11.9681155,6.97377165 10.2242373,9.21452652 Z M8.74091861,8.74091861 C10.4138621,7.06797507 10.4138621,4.35559774 8.74091861,2.68265423 C7.06797507,1.00971073 4.35559774,1.00971073 2.68265423,2.68265423 C1.00971073,4.35559774 1.00971073,7.06797507 2.68265423,8.74091861 C4.35559774,10.4138621 7.06797507,10.4138621 8.74091861,8.74091861 Z"></path>
+                            </g>
+                        </g>
+                    </g>
+                </g>
+            </g>
+        </g>
+    </g>
+</svg>

+ 1 - 0
resources/themes/cura-light/theme.json

@@ -221,6 +221,7 @@
         "setting_validation_warning_background": [255, 145, 62, 255],
         "setting_validation_warning": [127, 127, 127, 255],
         "setting_validation_ok": [255, 255, 255, 255],
+        "setting_filter_field" : [153, 153, 153, 255],
 
         "material_compatibility_warning": [0, 0, 0, 255],