From c131018ad18c520569ffef2f1bac2d2bb3fadf73 Mon Sep 17 00:00:00 2001 From: Volker E Date: Wed, 23 Jan 2019 14:36:14 -0800 Subject: [PATCH] Replace extension icons with standard OOUI icons Replacing outdated 'chem' and 'math*' icons with standardized OOUI icons from 'editing-advanced' pack. Bug: T195480 Change-Id: Iefc02ca5c2f0c310fdc83fe26a17f7fcba5195b8 --- extension.json | 39 ++-------------------- modules/ve-math/chem.svg | 9 ----- modules/ve-math/math-display-block.svg | 7 ---- modules/ve-math/math-display-default.svg | 10 ------ modules/ve-math/math-display-inline.svg | 10 ------ modules/ve-math/math.svg | 5 --- modules/ve-math/ve.ce.MWChemNode.js | 2 +- modules/ve-math/ve.ce.MWMathNode.js | 2 +- modules/ve-math/ve.ui.MWChemContextItem.js | 2 +- modules/ve-math/ve.ui.MWChemDialogTool.js | 2 +- modules/ve-math/ve.ui.MWLatexDialog.js | 6 ++-- modules/ve-math/ve.ui.MWLatexInspector.js | 6 ++-- modules/ve-math/ve.ui.MWMathContextItem.js | 2 +- modules/ve-math/ve.ui.MWMathDialogTool.js | 2 +- 14 files changed, 14 insertions(+), 90 deletions(-) delete mode 100644 modules/ve-math/chem.svg delete mode 100644 modules/ve-math/math-display-block.svg delete mode 100644 modules/ve-math/math-display-default.svg delete mode 100644 modules/ve-math/math-display-inline.svg delete mode 100644 modules/ve-math/math.svg diff --git a/extension.json b/extension.json index 77842ce9b..0dac1b6cf 100644 --- a/extension.json +++ b/extension.json @@ -168,8 +168,8 @@ ], "dependencies": [ "ext.visualEditor.mwcore", - "ext.math.visualEditor.icons", - "ext.math.styles" + "ext.math.styles", + "oojs-ui.styles.icons-editing-advanced" ], "messages": [ "math-visualeditor-mwchemdialog-title", @@ -247,41 +247,6 @@ "dependencies": [ "ext.math.visualEditor.chemSymbolsData" ] - }, - "ext.math.visualEditor.icons": { - "class": "ResourceLoaderImageModule", - "selectorWithoutVariant": ".oo-ui-icon-{name}", - "selectorWithVariant": ".oo-ui-image-{variant}.oo-ui-icon-{name}", - "variants": { - "progressive": { - "color": "#36c" - }, - "invert": { - "color": "#fff" - } - }, - "images": { - "math": { - "file": "ve-math/math.svg", - "variants": [ "progressive" ] - }, - "math-display-block": { - "file": "ve-math/math-display-block.svg", - "variants": [ "invert" ] - }, - "math-display-default": { - "file": "ve-math/math-display-default.svg", - "variants": [ "invert" ] - }, - "math-display-inline": { - "file": "ve-math/math-display-inline.svg", - "variants": [ "invert" ] - }, - "chem": { - "file": "ve-math/chem.svg", - "variants": [ "progressive" ] - } - } } }, "ResourceFileModulePaths": { diff --git a/modules/ve-math/chem.svg b/modules/ve-math/chem.svg deleted file mode 100644 index 0d69cf743..000000000 --- a/modules/ve-math/chem.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - chem - - - - - - diff --git a/modules/ve-math/math-display-block.svg b/modules/ve-math/math-display-block.svg deleted file mode 100644 index e9e08100c..000000000 --- a/modules/ve-math/math-display-block.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/modules/ve-math/math-display-default.svg b/modules/ve-math/math-display-default.svg deleted file mode 100644 index b4dbf347c..000000000 --- a/modules/ve-math/math-display-default.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/modules/ve-math/math-display-inline.svg b/modules/ve-math/math-display-inline.svg deleted file mode 100644 index 27e0bf852..000000000 --- a/modules/ve-math/math-display-inline.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/modules/ve-math/math.svg b/modules/ve-math/math.svg deleted file mode 100644 index 7cdef4e57..000000000 --- a/modules/ve-math/math.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - math - - diff --git a/modules/ve-math/ve.ce.MWChemNode.js b/modules/ve-math/ve.ce.MWChemNode.js index 13e30c5bb..3890ecd32 100644 --- a/modules/ve-math/ve.ce.MWChemNode.js +++ b/modules/ve-math/ve.ce.MWChemNode.js @@ -30,7 +30,7 @@ ve.ce.MWChemNode.static.name = 'mwChem'; ve.ce.MWChemNode.static.primaryCommandName = 'chemDialog'; -ve.ce.MWChemNode.static.iconWhenInvisible = 'chem'; +ve.ce.MWChemNode.static.iconWhenInvisible = 'beaker'; /* Registration */ diff --git a/modules/ve-math/ve.ce.MWMathNode.js b/modules/ve-math/ve.ce.MWMathNode.js index 385cd4159..1468e359a 100644 --- a/modules/ve-math/ve.ce.MWMathNode.js +++ b/modules/ve-math/ve.ce.MWMathNode.js @@ -30,7 +30,7 @@ ve.ce.MWMathNode.static.name = 'mwMath'; ve.ce.MWMathNode.static.primaryCommandName = 'mathDialog'; -ve.ce.MWMathNode.static.iconWhenInvisible = 'math'; +ve.ce.MWMathNode.static.iconWhenInvisible = 'mathematics'; /* Registration */ diff --git a/modules/ve-math/ve.ui.MWChemContextItem.js b/modules/ve-math/ve.ui.MWChemContextItem.js index 3edf6fe08..505feb8a9 100644 --- a/modules/ve-math/ve.ui.MWChemContextItem.js +++ b/modules/ve-math/ve.ui.MWChemContextItem.js @@ -27,7 +27,7 @@ OO.inheritClass( ve.ui.MWChemContextItem, ve.ui.MWLatexContextItem ); ve.ui.MWChemContextItem.static.name = 'chem'; -ve.ui.MWChemContextItem.static.icon = 'chem'; +ve.ui.MWChemContextItem.static.icon = 'beaker'; ve.ui.MWChemContextItem.static.label = OO.ui.deferMsg( 'math-visualeditor-mwchemdialog-title' ); diff --git a/modules/ve-math/ve.ui.MWChemDialogTool.js b/modules/ve-math/ve.ui.MWChemDialogTool.js index 57a037b74..f1cb1a8e8 100644 --- a/modules/ve-math/ve.ui.MWChemDialogTool.js +++ b/modules/ve-math/ve.ui.MWChemDialogTool.js @@ -20,7 +20,7 @@ ve.ui.MWChemDialogTool = function VeUiMWChemDialogTool( toolGroup, config ) { OO.inheritClass( ve.ui.MWChemDialogTool, ve.ui.FragmentWindowTool ); ve.ui.MWChemDialogTool.static.name = 'chem'; ve.ui.MWChemDialogTool.static.group = 'object'; -ve.ui.MWChemDialogTool.static.icon = 'chem'; +ve.ui.MWChemDialogTool.static.icon = 'beaker'; ve.ui.MWChemDialogTool.static.title = OO.ui.deferMsg( 'math-visualeditor-mwchemdialog-title' ); ve.ui.MWChemDialogTool.static.modelClasses = [ ve.dm.MWChemNode ]; diff --git a/modules/ve-math/ve.ui.MWLatexDialog.js b/modules/ve-math/ve.ui.MWLatexDialog.js index f62ee6a27..6b816f5b0 100644 --- a/modules/ve-math/ve.ui.MWLatexDialog.js +++ b/modules/ve-math/ve.ui.MWLatexDialog.js @@ -98,17 +98,17 @@ ve.ui.MWLatexDialog.prototype.initialize = function () { items: [ new OO.ui.ButtonOptionWidget( { data: 'default', - icon: 'math-display-default', + icon: 'mathematicsDisplayDefault', label: ve.msg( 'math-visualeditor-mwlatexinspector-display-default' ) } ), new OO.ui.ButtonOptionWidget( { data: 'inline', - icon: 'math-display-inline', + icon: 'mathematicsDisplayInline', label: ve.msg( 'math-visualeditor-mwlatexinspector-display-inline' ) } ), new OO.ui.ButtonOptionWidget( { data: 'block', - icon: 'math-display-block', + icon: 'mathematicsDisplayBlock', label: ve.msg( 'math-visualeditor-mwlatexinspector-display-block' ) } ) ] diff --git a/modules/ve-math/ve.ui.MWLatexInspector.js b/modules/ve-math/ve.ui.MWLatexInspector.js index 67c4b0481..ec171f430 100644 --- a/modules/ve-math/ve.ui.MWLatexInspector.js +++ b/modules/ve-math/ve.ui.MWLatexInspector.js @@ -44,17 +44,17 @@ ve.ui.MWLatexInspector.prototype.initialize = function () { items: [ new OO.ui.ButtonOptionWidget( { data: 'default', - icon: 'math-display-default', + icon: 'mathematicsDisplayDefault', label: ve.msg( 'math-visualeditor-mwlatexinspector-display-default' ) } ), new OO.ui.ButtonOptionWidget( { data: 'inline', - icon: 'math-display-inline', + icon: 'mathematicsDisplayInline', label: ve.msg( 'math-visualeditor-mwlatexinspector-display-inline' ) } ), new OO.ui.ButtonOptionWidget( { data: 'block', - icon: 'math-display-block', + icon: 'mathematicsDisplayBlock', label: ve.msg( 'math-visualeditor-mwlatexinspector-display-block' ) } ) ] diff --git a/modules/ve-math/ve.ui.MWMathContextItem.js b/modules/ve-math/ve.ui.MWMathContextItem.js index 99ba65939..13d8beb50 100644 --- a/modules/ve-math/ve.ui.MWMathContextItem.js +++ b/modules/ve-math/ve.ui.MWMathContextItem.js @@ -27,7 +27,7 @@ OO.inheritClass( ve.ui.MWMathContextItem, ve.ui.MWLatexContextItem ); ve.ui.MWMathContextItem.static.name = 'math'; -ve.ui.MWMathContextItem.static.icon = 'math'; +ve.ui.MWMathContextItem.static.icon = 'mathematics'; ve.ui.MWMathContextItem.static.label = OO.ui.deferMsg( 'math-visualeditor-mwmathdialog-title' ); diff --git a/modules/ve-math/ve.ui.MWMathDialogTool.js b/modules/ve-math/ve.ui.MWMathDialogTool.js index dd19b9f5e..9f185e819 100644 --- a/modules/ve-math/ve.ui.MWMathDialogTool.js +++ b/modules/ve-math/ve.ui.MWMathDialogTool.js @@ -20,7 +20,7 @@ ve.ui.MWMathDialogTool = function VeUiMWMathDialogTool( toolGroup, config ) { OO.inheritClass( ve.ui.MWMathDialogTool, ve.ui.FragmentWindowTool ); ve.ui.MWMathDialogTool.static.name = 'math'; ve.ui.MWMathDialogTool.static.group = 'object'; -ve.ui.MWMathDialogTool.static.icon = 'math'; +ve.ui.MWMathDialogTool.static.icon = 'mathematics'; ve.ui.MWMathDialogTool.static.title = OO.ui.deferMsg( 'math-visualeditor-mwmathdialog-title' ); ve.ui.MWMathDialogTool.static.modelClasses = [ ve.dm.MWMathNode ];