From 0fb0427a822ce221797243f37ae58b99c088dd7d Mon Sep 17 00:00:00 2001 From: franglais125 Date: Wed, 7 Jun 2017 12:44:11 -0400 Subject: [PATCH] Add number overlay style. --- appIcons.js | 4 +--- stylesheet.css | 8 +++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/appIcons.js b/appIcons.js index 8dc5c94..c10fc24 100644 --- a/appIcons.js +++ b/appIcons.js @@ -710,7 +710,7 @@ const taskbarAppIcon = new Lang.Class({ x_align: St.Align.START, y_align: St.Align.START, x_expand: true, y_expand: true }); - this._numberOverlayStyle = 'background-color: rgba(0,0,0,0.8);' + this._numberOverlayLabel.add_style_class_name('number-overlay'); this._numberOverlayOrder = -1; this._numberOverlayBin.hide(); @@ -729,9 +729,7 @@ const taskbarAppIcon = new Lang.Class({ let font_size = Math.round(Math.max(12, 0.3*natWidth) / scaleFactor); let size = Math.round(font_size*1.2); this._numberOverlayLabel.set_style( - this._numberOverlayStyle + 'font-size: ' + font_size + 'px;' + - 'text-align: center;' + 'border-radius: ' + this.icon.iconSize + 'px;' + 'width: ' + size + 'px; height: ' + size +'px;' ); diff --git a/stylesheet.css b/stylesheet.css index 9817e1b..bd2d952 100644 --- a/stylesheet.css +++ b/stylesheet.css @@ -83,4 +83,10 @@ .showdesktop-button-hovered { background-color: rgba(200, 200, 200, .4); -} \ No newline at end of file +} + +.number-overlay { + background-color: rgba(0,0,0,0.8); + color: rgba(256, 256, 256, 1); + text-align: center; +}