From 43c0b512bd104af7ba6dcfb5a436636a41ca33e7 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Mon, 11 Mar 2019 11:55:29 +0100 Subject: [PATCH] CheckBox styling. --- Content.Client/UserInterface/NanoStyle.cs | 20 +++++ Resources/Nano/checkbox_checked.svg | 82 +++++++++--------- Resources/Nano/checkbox_checked.svg.96dpi.png | Bin 550 -> 484 bytes Resources/Nano/checkbox_unchecked.svg | 38 ++++---- .../Nano/checkbox_unchecked.svg.96dpi.png | Bin 402 -> 352 bytes 5 files changed, 80 insertions(+), 60 deletions(-) diff --git a/Content.Client/UserInterface/NanoStyle.cs b/Content.Client/UserInterface/NanoStyle.cs index 78f87ab06c..ac8fa8b11d 100644 --- a/Content.Client/UserInterface/NanoStyle.cs +++ b/Content.Client/UserInterface/NanoStyle.cs @@ -127,6 +127,10 @@ namespace Content.Client.UserInterface }; progressBarForeground.SetContentMarginOverride(StyleBox.Margin.Vertical, 5); + // CheckBox + var checkBoxTextureChecked = resCache.GetTexture("/Nano/checkbox_checked.svg.96dpi.png"); + var checkBoxTextureUnchecked = resCache.GetTexture("/Nano/checkbox_unchecked.svg.96dpi.png"); + Stylesheet = new Stylesheet(new[] { // Default font. @@ -313,6 +317,22 @@ namespace Content.Client.UserInterface { new StyleProperty(ProgressBar.StylePropertyForeground, progressBarForeground) }), + + // CheckBox + new StyleRule(new SelectorElement(typeof(CheckBox), null, null, null), new [] + { + new StyleProperty(CheckBox.StylePropertyIcon, checkBoxTextureUnchecked), + }), + + new StyleRule(new SelectorElement(typeof(CheckBox), null, null, Button.StylePseudoClassPressed), new [] + { + new StyleProperty(CheckBox.StylePropertyIcon, checkBoxTextureChecked), + }), + + new StyleRule(new SelectorElement(typeof(CheckBox), null, null, null), new [] + { + new StyleProperty(CheckBox.StylePropertyHSeparation, 3), + }), }); } } diff --git a/Resources/Nano/checkbox_checked.svg b/Resources/Nano/checkbox_checked.svg index 3cf80793aa..bbe62581e5 100644 --- a/Resources/Nano/checkbox_checked.svg +++ b/Resources/Nano/checkbox_checked.svg @@ -5,33 +5,33 @@ 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" - style="enable-background:new" - id="svg8" + width="20" + height="19.999998" + viewBox="0 0 5.2916661 5.2916662" version="1.1" - viewBox="0 0 6.3499993 6.3499995" - height="23.999998" - width="24"> + id="svg8" + style="enable-background:new"> + refX="0" + id="Arrow1Lstart" + style="overflow:visible"> + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt" + transform="matrix(0.8,0,0,0.8,10,0)" /> + style="color-interpolation-filters:sRGB" + id="filter9714"> + id="feBlend9716" /> + id="layer1" + transform="matrix(0.84876535,0,0,0.84876535,-65.887781,-120.30434)" + style="filter:url(#filter9714)"> + height="5.1954541" + x="78.147339" + y="142.25995" + style="display:inline;fill:#3d4059;fill-opacity:1;fill-rule:nonzero;stroke:#3d4059;stroke-width:1.15454543;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers" + ry="0.5931561" /> + transform="matrix(0.84876535,0,0,0.84876535,-2.7438235,-11.726601)"> + style="fill:#a88b5e;fill-opacity:1"> + height="10.583333" + width="1.8520833" + id="rect9671" + style="fill:#a88b5e;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.17499995;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" + rx="0.52916664" /> + height="1.8520832" + width="5.2916665" + id="rect9673" + style="fill:#a88b5e;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.17499971;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" + rx="0.52916664" /> diff --git a/Resources/Nano/checkbox_checked.svg.96dpi.png b/Resources/Nano/checkbox_checked.svg.96dpi.png index 94a00a937bab2a1217b859261fdfc88ade48baaa..5c5771fcea20186743e968eba605df04828b9b6f 100644 GIT binary patch delta 418 zcmV;T0bTy41mpuDiBL{Q4GJ0x0000DNk~Le0000K0000K2nGNE0F8+q4Ur*De_=^P zK~y-6t<=p*LO~eD@&C*mH9trUH4BuMZEBS%K@cqyLIM}vNz^Kcl5R)w27;h$>lH)^ z3YMvqo^zZwLD~t^lh1D8nIA9jz=%Sjpz2NIL}+n}&;i_~tD(3Ovx+Jj-#i0xfxzPu z1Mmvi@4lAjCK5GyTjH5Gy zshH$oOQ9q*UNzkh?H)`=~m6p9hY1 z3`|>7y0hq;vtf=27rcT+KP-m@huaFDXEqE#?Cu?pZFO}?kV_kQ4QTfuc;shl%rPOr zb4ydHTG%#(gI`!nQMvZ00UD~ey}j7z~INDjHdQDr13VS-IG&I_9qC? zYy%7@RUDB(Z>AfQ(~$^qIX6yor84RD+wQyS0~y?Zv>i0(iMVzB3D4_+jr5#!X8-^I M07*qoM6N<$f<3OUApigX delta 485 zcmVmz^f1^o6 zK~zYIwUj?^(@+#g&wI9u0!bx2peh4WB|bq)XgaX4A*j?&e1m)^I(9(WU_xT3RAr#8 z@~`Stqy&%{XrnHjS`yp0gA>Og&!V=&Z?k>hIrsWKJq7Uc)w>FT-UBvRLKL(Kq~2^c zdTIhc2ApNUqX;7p4IB)cTq?lsmc!T=J{^19{F#Tpf34a$_kl5{ + id="svg8"> + refX="0" + id="Arrow1Lstart" + style="overflow:visible"> + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt" + transform="matrix(0.8,0,0,0.8,10,0)" /> + id="layer1" + transform="matrix(0.83333328,0,0,0.83333328,-64.641718,-118.06889)"> + height="5.1954546" + x="78.147339" + y="142.25995" + style="fill:none;stroke:#3d4059;stroke-width:1.15454543;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers" + ry="0.5931561" /> diff --git a/Resources/Nano/checkbox_unchecked.svg.96dpi.png b/Resources/Nano/checkbox_unchecked.svg.96dpi.png index 9b9a7be28b3080aa3ccf966f6c770d799040ac2d..090d1acc1f6b8db24867c4149a65481cf3601974 100644 GIT binary patch delta 286 zcmV+(0pb3V1KfH_AB!86#HNF*wDDbona z4YXY5rCCryiXBP0UpEiluNasSK$>RVAfA95piW!|U>k6w<;!HH0$Tt+68c?kvRfC# z_#ZF;ub{C9+9$(LnayJqlLkNnbb#o1PVP*``{H%_5Cito?AcU+Pv#qr>QEzmCpiAl+yo27I%F5pH$el~I}H)oF*U%QX*%jWeA)Dkp+ kS|qf`Semop+kCqI0jWAYef{A8DgXcg07*qoM6N<$f@8yWCIA2c delta 337 zcmV-X0j~bw0+ItEiBL{Q4GJ0x0000DNk~Le0000O0000O2nGNE0N{5$_>mz@e*q6k zL_t(YiS3lJO2c3jM$b(X%_0;`9i%VNIyhN66tQE*3|;C}@F@iM`UH+b2bVy71VtR$ zRZL!@kV%3x3D-?R#KGSP4msn;&pE>nR{)MClb!vIbE&EULLaa(BL^acW#Z-YC=9pa z`~L1*+I~V97)rlmopkck)?s&We}!;fvmBu7rczj{8vKDA06_v9p;uXN6ARrifMc16enJyy0!^R^{D*)IWRxzdpl74;)HRU_I;>2Y z4aC6l=cLRkC-*nJS_sRUWM5Iaw-PU(1M9log07N-?7Fpy<6`fmw{TM_CoH55c$j~F jF7SeIlXQxUC=9nB3N=g0H7f!m00000NkvXXu0mjfm|lwt