[vlc-commits] qml: change the enabled indicator from blue background to a dot for buttons
Pierre Lamot
git at videolan.org
Mon Oct 14 11:58:57 CEST 2019
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Mon Sep 16 15:49:33 2019 +0200| [347617cf2324a8bb2194ad2a72990808f20993ec] | committer: Jean-Baptiste Kempf
qml: change the enabled indicator from blue background to a dot for buttons
the blue background was not visible when the button had the focus
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=347617cf2324a8bb2194ad2a72990808f20993ec
---
modules/gui/qt/Makefile.am | 1 +
modules/gui/qt/pixmaps/VLCIcons.json | 1 +
modules/gui/qt/pixmaps/VLCIcons.ttf | Bin 25420 -> 25520 bytes
.../gui/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(-)
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 4bfc5ff7c6..1c094a5220 100644
Binary files a/modules/gui/qt/pixmaps/VLCIcons.ttf and b/modules/gui/qt/pixmaps/VLCIcons.ttf differ
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
+ }
+
}
}
More information about the vlc-commits
mailing list