[vlc-devel] [PATCH 02/49] qml: change the enabled indicator from blue background to a dot for buttons

Pierre Lamot pierre at videolabs.io
Fri Oct 11 15:17:26 CEST 2019


  the blue background was not visible when the button had the focus
---
 modules/gui/qt/Makefile.am                    |   1 +
 modules/gui/qt/pixmaps/VLCIcons.json          |   1 +
 modules/gui/qt/pixmaps/VLCIcons.ttf           | Bin 25420 -> 25520 bytes
 .../qt/pixmaps/playlist/active_indicator.svg  |  78 ++++++++++++
 modules/gui/qt/qml/style/VLCIcons.qml         | 115 +++++++++---------
 modules/gui/qt/qml/utils/IconToolButton.qml   |  20 ++-
 6 files changed, 152 insertions(+), 63 deletions(-)
 create mode 100644 modules/gui/qt/pixmaps/playlist/active_indicator.svg

diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index af4a5d05cc..9aa28173a8 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -435,6 +435,7 @@ libqt_plugin_la_RES = \
 	gui/qt/pixmaps/playlist/repeat_all.svg \
 	gui/qt/pixmaps/playlist/repeat_off.svg \
 	gui/qt/pixmaps/playlist/repeat_one.svg \
+	gui/qt/pixmaps/playlist/active_indicator.svg \
 	gui/qt/pixmaps/playlist/shuffle_on.svg \
 	gui/qt/pixmaps/playlist/dropzone.svg \
 	gui/qt/pixmaps/playlist/sidebar-icons/capture.svg \
diff --git a/modules/gui/qt/pixmaps/VLCIcons.json b/modules/gui/qt/pixmaps/VLCIcons.json
index 3c94990760..1434bf93c1 100644
--- a/modules/gui/qt/pixmaps/VLCIcons.json
+++ b/modules/gui/qt/pixmaps/VLCIcons.json
@@ -85,6 +85,7 @@
 		{"key":"podcast", "path": "./playlist/sidebar-icons/podcast.svg"},
 		{"key":"playlist", "path": "./playlist/playlist.svg"},
 		{"key":"repeat_all", "path": "./playlist/repeat_all.svg"},
+		{"key":"active_indicator", "path": "./playlist/active_indicator.svg"},
 		{"key":"lock", "path": "./lock.svg"},
 		{"key":"slower", "path": "./slower.svg"},
 		{"key":"clear", "path": "./clear.svg"},
diff --git a/modules/gui/qt/pixmaps/VLCIcons.ttf b/modules/gui/qt/pixmaps/VLCIcons.ttf
index 4bfc5ff7c6145befc8f4ba2ecac8e6b6c4172925..1c094a5220eacdab2476265b1e25bf80004b1584 100644
GIT binary patch
delta 1507
zcma)6ZA at EL7=F(ED%)U#(&BpImfNq}QaeTqtAjCSGP4*XDI!ibTL)u|k`!o4XNJbq
zVDtx|$-KlLWG=>JQx`-N{9zWO2ERt4&iIR|A&W7 at A2V4@Br%!bdvC9N7)|WWIp=ww
z_j%uQ at 7wpBufAaKeaTwE0F>c5 at aQ;ptgC(Uor*!AZ<^Se#H0IT2cCIk3Six2_w)_*
zW>@cDZ3MU_8r>IKs|(~r$v|f8?6da4vw+kAJeE!O_nvXSeeD$aexwmk6CwHdUn!A;
zY=3$ve?B?+ at W*6-Kts)p^z}~axsL#`iEMeO_k0$AaP(^IAnDcN-l6`{KNClQCqAK#
zUD=V*{K3TGb3iyn8;I|kUqSNgKYY7zYESF$*v0=sfw+135PeN?eT5xnQ+gXqu?hVm
zTVxCR8Ez=*!d=`Z1#gWSGZk1TF-B=>Ah0;C0zG8knwS^(0ArK$A;HG<sCcz-b?@@t
zJFcCsr0bd-l3$d6R=Siqcd0w$UU1*49ahWLPW6(9^K^J-J>Pr%-f{1Ych>uzcg5G^
zoAABwTlSau<Nl}oultt*2zUdzz;fV at R-<)k)7odj2ZQ<G#o#x=)sQ`OJ+xNW5Js44
z1`ZyoPMDjSKQ7fq!;CG!&1o3NP9WfryjoMdF;?Z|G$pJkPN&l0R7`~V(felAf{V3t
z%j_*u+o8Zs3BB5ZrZz?~#o)i!#+aKq9X9S$O)hnoR?0UtS=Qtmf$C~|nWL<pwHs at x
zOm;vn&ZUkrdo?KUU5s<Tabwtna;WsWQN(Z*58!chS0ar;jNxfa;U&C=OY|*z?Fo;*
z|3rmfbV&CyZ$158P4Po4R;92;$8JWHMob$c%FXo8yXy-UHvC3};kE);k0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-54~cjmu#XZVw*{pNYgHJ0mYe&P8S;*Xz#KU5UD*v-QWo5u|mg
z=WkMluHsJN+faPxzEf&mXGuQK&clUD+yxKStc5o=#cSMR#n;6z7(SojyJ&d5hVPrO
z*Bkc6*b{_(w&uo6A+VZO=tceue+pH&lQL_FqY+ziKenR>Y3#uSp1~0mZo^wRL4~<1
znAzFyG5_uhnBD!=RZW{%Jiz>{(Jj_7?H+D!={Lye$+ID at NZVu~WSXYzc_m!fcMG+o
zaEr}l&TZ>0N&kw-Yb8Z;$z6&NN|)>^q28NN>6%*7-cXVUQMn}ZlG~K+>_nh2H$@xK
z>dfOfvA3851MlTyvZBbXR&TBUkJyYPgtU;cSnQ4e!bDldVlxz05_W<)AuXlZZz=4w
zN`6krEmn4#7T#T|L=wv=%NSDDF4K-=Z8=bZGo at od*h3p`9R%81lp*0 at PQTgH4wj%}
z+QBl)8N-t$2L)9u<`@LZN at q$gr%=}QLg$Mxqm_He!JHEBcCds8aLB<j{e at Q@tUzU}
z94sh)ySaBT8tg?9BS-;T$Fmdr_Kc=;YTa;DjW=v)xm)c`j-<>_5`Oc?!AGSSn$1m#
zD33LpqlsLQTa5vWA5xcAhbx~#aUoH|iZw$SnQj}f#YH-Q4)Idu*;g(8@=N9)!$S0h

diff --git a/modules/gui/qt/pixmaps/playlist/active_indicator.svg b/modules/gui/qt/pixmaps/playlist/active_indicator.svg
new file mode 100644
index 0000000000..f49b6684bf
--- /dev/null
+++ b/modules/gui/qt/pixmaps/playlist/active_indicator.svg
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<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"
+   width="48"
+   height="48"
+   viewBox="0 0 48 48"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
+   sodipodi:docname="dot.svg">
+  <defs
+     id="defs8" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1920"
+     inkscape:window-height="1043"
+     id="namedview6"
+     showgrid="false"
+     inkscape:zoom="4"
+     inkscape:cx="17.670345"
+     inkscape:cy="-23.27049"
+     inkscape:window-x="2560"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="layer1"
+     showguides="true"
+     inkscape:guide-bbox="true">
+    <sodipodi:guide
+       position="0,24.017661"
+       orientation="1,0"
+       id="guide2390"
+       inkscape:locked="false" />
+    <sodipodi:guide
+       position="23.59322,0"
+       orientation="0,1"
+       id="guide2392"
+       inkscape:locked="false" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Master"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-384,-1004.3622)"
+     style="display:inline">
+    <path
+       style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.17890847;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="m 412,1052.3622 a 3.999998,3.9999891 0 0 1 -3.99299,4 3.999998,3.9999891 0 0 1 -4.00698,-3.986 3.999998,3.9999891 0 0 1 3.97898,-4.0139 3.999998,3.9999891 0 0 1 4.0209,3.972"
+       id="path4518"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>
diff --git a/modules/gui/qt/qml/style/VLCIcons.qml b/modules/gui/qt/qml/style/VLCIcons.qml
index bdf48d0de3..70db7f3283 100644
--- a/modules/gui/qt/qml/style/VLCIcons.qml
+++ b/modules/gui/qt/qml/style/VLCIcons.qml
@@ -110,62 +110,63 @@ Item {
     property string podcast : "\ue04e"
     property string playlist : "\ue04f"
     property string repeat_all : "\ue050"
-    property string lock : "\ue051"
-    property string slower : "\ue052"
-    property string clear : "\ue053"
-    property string profile_new : "\ue054"
-    property string addon_green : "\ue055"
-    property string addon_broken : "\ue056"
-    property string addon_magenta : "\ue057"
-    property string addon_cyan : "\ue058"
-    property string score : "\ue059"
-    property string addon_yellow : "\ue05a"
-    property string addon_blue : "\ue05b"
-    property string addon : "\ue05c"
-    property string addon_red : "\ue05d"
-    property string advprefs_playlist : "\ue05e"
-    property string advprefs_audio : "\ue05f"
-    property string advprefs_video : "\ue060"
-    property string advprefs_extended : "\ue061"
-    property string advprefs_codec : "\ue062"
-    property string advprefs_intf : "\ue063"
-    property string advprefs_sout : "\ue064"
-    property string win7thumbnail_next : "\ue065"
-    property string win7thumbnail_play : "\ue066"
-    property string win7thumbnail_pause : "\ue067"
-    property string win7thumbnail_prev : "\ue068"
-    property string next : "\ue069"
-    property string play : "\ue06a"
-    property string space : "\ue06b"
-    property string pause : "\ue06c"
-    property string faster2 : "\ue06d"
-    property string wait1 : "\ue06e"
-    property string wait2 : "\ue06f"
-    property string wait3 : "\ue070"
-    property string wait4 : "\ue071"
-    property string slower2 : "\ue072"
-    property string messages : "\ue073"
-    property string settings : "\ue074"
-    property string info : "\ue075"
-    property string preferences : "\ue076"
-    property string exit : "\ue077"
-    property string help : "\ue078"
-    property string stream : "\ue079"
-    property string valid : "\ue07a"
-    property string search_clear : "\ue07b"
-    property string menu : "\ue07c"
-    property string topbar_video : "\ue07d"
-    property string topbar_music : "\ue07e"
-    property string topbar_network : "\ue07f"
-    property string topbar_previous : "\ue080"
-    property string topbar_next : "\ue081"
-    property string topbar_filter : "\ue082"
-    property string topbar_sort : "\ue083"
-    property string rename : "\ue084"
-    property string del : "\ue085"
-    property string close : "\ue086"
-    property string ellipsis : "\ue087"
-    property string grid : "\ue088"
-    property string list : "\ue089"
+    property string active_indicator : "\ue051"
+    property string lock : "\ue052"
+    property string slower : "\ue053"
+    property string clear : "\ue054"
+    property string profile_new : "\ue055"
+    property string addon_green : "\ue056"
+    property string addon_broken : "\ue057"
+    property string addon_magenta : "\ue058"
+    property string addon_cyan : "\ue059"
+    property string score : "\ue05a"
+    property string addon_yellow : "\ue05b"
+    property string addon_blue : "\ue05c"
+    property string addon : "\ue05d"
+    property string addon_red : "\ue05e"
+    property string advprefs_playlist : "\ue05f"
+    property string advprefs_audio : "\ue060"
+    property string advprefs_video : "\ue061"
+    property string advprefs_extended : "\ue062"
+    property string advprefs_codec : "\ue063"
+    property string advprefs_intf : "\ue064"
+    property string advprefs_sout : "\ue065"
+    property string win7thumbnail_next : "\ue066"
+    property string win7thumbnail_play : "\ue067"
+    property string win7thumbnail_pause : "\ue068"
+    property string win7thumbnail_prev : "\ue069"
+    property string next : "\ue06a"
+    property string play : "\ue06b"
+    property string space : "\ue06c"
+    property string pause : "\ue06d"
+    property string faster2 : "\ue06e"
+    property string wait1 : "\ue06f"
+    property string wait2 : "\ue070"
+    property string wait3 : "\ue071"
+    property string wait4 : "\ue072"
+    property string slower2 : "\ue073"
+    property string messages : "\ue074"
+    property string settings : "\ue075"
+    property string info : "\ue076"
+    property string preferences : "\ue077"
+    property string exit : "\ue078"
+    property string help : "\ue079"
+    property string stream : "\ue07a"
+    property string valid : "\ue07b"
+    property string search_clear : "\ue07c"
+    property string menu : "\ue07d"
+    property string topbar_video : "\ue07e"
+    property string topbar_music : "\ue07f"
+    property string topbar_network : "\ue080"
+    property string topbar_previous : "\ue081"
+    property string topbar_next : "\ue082"
+    property string topbar_filter : "\ue083"
+    property string topbar_sort : "\ue084"
+    property string rename : "\ue085"
+    property string del : "\ue086"
+    property string close : "\ue087"
+    property string ellipsis : "\ue088"
+    property string grid : "\ue089"
+    property string list : "\ue08a"
 
 }
\ No newline at end of file
diff --git a/modules/gui/qt/qml/utils/IconToolButton.qml b/modules/gui/qt/qml/utils/IconToolButton.qml
index ce8cac4397..4f282431e9 100644
--- a/modules/gui/qt/qml/utils/IconToolButton.qml
+++ b/modules/gui/qt/qml/utils/IconToolButton.qml
@@ -40,12 +40,6 @@ ToolButton {
 
     contentItem: Item {
 
-        Rectangle{
-            anchors.fill: parent
-            visible: control.checked && !paintOnly
-            color: VLCStyle.colors.bannerHover
-        }
-
         Rectangle {
             anchors.fill: parent
             visible: control.activeFocus || control.hovered || control.highlighted
@@ -79,6 +73,20 @@ ToolButton {
 
             }
 
+            Label {
+                text: VLCIcons.active_indicator
+                color: control.enabled ? control.color : control.colorDisabled
+                visible: !control.paintOnly && control.checked
+
+                anchors.centerIn: parent
+
+                font.pixelSize: control.size
+                font.family: VLCIcons.fontFamily
+
+                verticalAlignment: Text.AlignVCenter
+                horizontalAlignment: Text.AlignHCenter
+            }
+
         }
     }
 
-- 
2.20.1



More information about the vlc-devel mailing list