feat: use icon for play/pause keypress action (#818)
* feat: use icon for play/pause keypress action * fix: use rectangle layout in svg-single-icon-key
This commit is contained in:
committed by
László Monda
parent
166834e46c
commit
6f073ad718
@@ -1,7 +1,7 @@
|
||||
<svg:use [attr.xlink:href]="icon"
|
||||
[attr.width]="svgWidth"
|
||||
[attr.height]="svgHeight"
|
||||
[attr.x]="svgWidth"
|
||||
[attr.x]="svgX"
|
||||
[attr.y]="svgHeight">
|
||||
</svg:use>
|
||||
<svg:g svg-secondary-role
|
||||
|
||||
|
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 336 B |
@@ -16,6 +16,7 @@ export class SvgSingleIconKeyComponent implements OnChanges {
|
||||
|
||||
svgHeight: number;
|
||||
svgWidth: number;
|
||||
svgX: number;
|
||||
secondaryTextY: number;
|
||||
secondaryHeight: number;
|
||||
|
||||
@@ -34,8 +35,9 @@ export class SvgSingleIconKeyComponent implements OnChanges {
|
||||
secondaryYModifier = 5;
|
||||
}
|
||||
|
||||
this.svgWidth = this.width / 3;
|
||||
this.svgWidth = this.width / 2.075;
|
||||
this.svgHeight = this.height / 3;
|
||||
this.svgX = (this.width - this.svgWidth) / 2;
|
||||
this.secondaryHeight = this.height / 4;
|
||||
this.secondaryTextY = this.height - this.secondaryHeight - SECONDARY_ROLE_BOTTOM_MARGIN - secondaryYModifier;
|
||||
}
|
||||
|
||||
@@ -352,6 +352,7 @@ export class MapperService {
|
||||
this.mediaScancodeIcons.set(181, 'icon-kbd__media--next');
|
||||
this.mediaScancodeIcons.set(182, 'icon-kbd__media--prev');
|
||||
this.mediaScancodeIcons.set(184, 'icon-kbd__fn--eject');
|
||||
this.mediaScancodeIcons.set(205, 'icon-kbd__play-pause');
|
||||
this.mediaScancodeIcons.set(226, 'icon-kbd__media--mute');
|
||||
this.mediaScancodeIcons.set(233, 'icon-kbd__media--vol-up');
|
||||
this.mediaScancodeIcons.set(234, 'icon-kbd__media--vol-down');
|
||||
|
||||
Reference in New Issue
Block a user