Prtksxna has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/155067

Change subject: article: Fix settings icon
......................................................................

article: Fix settings icon

1. Change color from #777 to #AAA
2. Add PNG fallback using `background-image-svg`

Bug: 69022
Change-Id: I0bbfe2aaa0c6e6ed1300bafa1352dd54037929b9
---
M resources/ext.popups.core.less
M resources/ext.popups.renderer.article.js
A resources/gear_gray.png
M resources/gear_gray.svg
4 files changed, 8 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups 
refs/changes/67/155067/1

diff --git a/resources/ext.popups.core.less b/resources/ext.popups.core.less
index 7cef659..f895bdb 100644
--- a/resources/ext.popups.core.less
+++ b/resources/ext.popups.core.less
@@ -1,3 +1,5 @@
+@import "mediawiki.mixins.less";
+
 /* Code adapted from Yair Rand's NavPopupsRestyled.js
  * https://en.wikipedia.org/wiki/User:Yair_rand/NavPopupsRestyled.js
  */
@@ -92,10 +94,12 @@
                }
 
                .mwe-popups-settings-icon {
+                       display: inline-block;
                        cursor: pointer;
                        margin-left: 5px;
-                       padding: 5px;
-                       width: 13px;
+                       height: 16px;
+                       width: 16px;
+                       .background-image-svg( "gear_gray.svg", "gear_gray.png" 
);
                }
        }
 
diff --git a/resources/ext.popups.renderer.article.js 
b/resources/ext.popups.renderer.article.js
index 78ebce3..972fa6a 100644
--- a/resources/ext.popups.renderer.article.js
+++ b/resources/ext.popups.renderer.article.js
@@ -111,9 +111,7 @@
                        timestampclass = ( timediff < oneDay ) ?
                                'mwe-popups-timestamp-recent' :
                                'mwe-popups-timestamp-older',
-                       $settingsImage = $( '<img>' )
-                               .addClass( 'mwe-popups-settings-icon' )
-                               .attr( 'src', mw.config.get( 
'wgExtensionAssetsPath' ) + '/Popups/resources/gear_gray.svg' ),
+                       $settingsImage = $( '<a>' ).addClass( 
'mwe-popups-settings-icon' ),
                        $timestamp = $( '<div>' )
                                .addClass( timestampclass )
                                .append(
diff --git a/resources/gear_gray.png b/resources/gear_gray.png
new file mode 100644
index 0000000..a6ae346
--- /dev/null
+++ b/resources/gear_gray.png
Binary files differ
diff --git a/resources/gear_gray.svg b/resources/gear_gray.svg
index 7f5217c..2f44fd6 100644
--- a/resources/gear_gray.svg
+++ b/resources/gear_gray.svg
@@ -3,7 +3,7 @@
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
 <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px"
         viewBox="0 0 96 96" enable-background="new 0 0 96 96" 
xml:space="preserve">
-<path fill="#777777" 
d="M96,56.8V39.2l-10.8-1.8c-0.8-2.9-2-5.7-3.4-8.2l6.3-8.9L75.7,7.8l-8.9,6.3c-2.6-1.4-5.3-2.6-8.2-3.4L56.8,0
+<path fill="#AAAAAA" 
d="M96,56.8V39.2l-10.8-1.8c-0.8-2.9-2-5.7-3.4-8.2l6.3-8.9L75.7,7.8l-8.9,6.3c-2.6-1.4-5.3-2.6-8.2-3.4L56.8,0
        
H39.2l-1.8,10.8c-2.9,0.8-5.7,2-8.2,3.4l-8.9-6.3L7.8,20.3l6.3,8.9c-1.4,2.6-2.6,5.3-3.4,8.3L0,39.2v17.6l10.7,1.8
        
c0.8,2.9,2,5.7,3.4,8.3l-6.3,8.9l12.4,12.4l8.9-6.3c2.6,1.4,5.3,2.6,8.3,3.4L39.2,96h17.6l1.8-10.8c2.9-0.8,5.7-2,8.2-3.4l8.9,6.3
        l12.4-12.4l-6.3-8.9c1.4-2.6,2.6-5.3,3.4-8.3L96,56.8z 
M48,66.4c-10.2,0-18.4-8.3-18.4-18.4c0-10.2,8.3-18.4,18.4-18.4

-- 
To view, visit https://gerrit.wikimedia.org/r/155067
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0bbfe2aaa0c6e6ed1300bafa1352dd54037929b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Prtksxna <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to