Forráskód Böngészése

Merge pull request #478 from ckeditor/t/ckeditor5-font/36

Internal: Brought back the missing outline of the icon inside the active `ColorTileView` (removed in 5325ea8, see ckeditor/ckeditor5-font#36).
Aleksander Nowodzinski 6 éve
szülő
commit
c3928418ee

+ 9 - 0
packages/ckeditor5-ui/src/colorgrid/colortileview.js

@@ -51,4 +51,13 @@ export default class ColorTileView extends ButtonView {
 			}
 		} );
 	}
+
+	/**
+	 * @inheritDoc
+	 */
+	render() {
+		super.render();
+
+		this.iconView.fillColor = 'hsl(0, 0%, 100%)';
+	}
 }

+ 1 - 0
packages/ckeditor5-ui/tests/colorgrid/colortileview.js

@@ -34,5 +34,6 @@ describe( 'ColorTileView', () => {
 		colorTile.render();
 
 		expect( colorTile.icon ).to.equal( checkIcon );
+		expect( colorTile.iconView.fillColor ).to.equal( 'hsl(0, 0%, 100%)' );
 	} );
 } );

+ 1 - 1
packages/ckeditor5-ui/theme/icons/color-tile-check.svg

@@ -1 +1 @@
-<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M6.193 17.02l-.102-.121-2.553-3.536a2 2 0 0 1 .956-3.3c.699-.182 1.442.026 2.005.614L7.642 12.1l6.515-8.164.074-.083c.757-.756 1.652-.65 2.38-.081.77.6.869 1.79.159 2.573L9.203 16.896l-.105.124c-.385.386-.91.597-1.453.586-.543.01-1.067-.2-1.452-.586z" fill-opacity=".5"/><path d="M7.645 16.606a.997.997 0 0 0 .745-.292l7.606-10.606c.391-.39.28-.93 0-1.148-.28-.219-.667-.39-1.058 0L7.645 13.7 5.72 11.304a1 1 0 1 0-1.414 1.414l2.596 3.596a.997.997 0 0 0 .744.292z"/></svg>
+<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M6.193 17.02l-.102-.121-2.553-3.536a2 2 0 0 1 .956-3.3c.699-.182 1.442.026 2.005.614L7.642 12.1l6.515-8.164.074-.083c.757-.756 1.652-.65 2.38-.081.77.6.869 1.79.159 2.573L9.203 16.896l-.105.124c-.385.386-.91.597-1.453.586-.543.01-1.067-.2-1.452-.586z" fill-opacity=".8"/><path d="M7.645 16.606a.997.997 0 0 0 .745-.292l7.606-10.606c.391-.39.28-.93 0-1.148-.28-.219-.667-.39-1.058 0L7.645 13.7 5.72 11.304a1 1 0 1 0-1.414 1.414l2.596 3.596a.997.997 0 0 0 .744.292z"/></svg>