From c80a8fd7ebbfacef09e33b0d387ada76d9c9dde2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Sun, 24 Feb 2019 14:09:05 +0100 Subject: [PATCH] workspace label: pick up the correct css for the label A bit ad-hoc, but should work correctly. The idea is picking up css rules with this selector: `#panel .panel-button StLabel` --- tiling.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tiling.js b/tiling.js index 5cb7a6a..a2ac737 100644 --- a/tiling.js +++ b/tiling.js @@ -153,10 +153,21 @@ class Space extends Array { `background: black; box-shadow: 0px -4px 8px 0 rgba(0, 0, 0, .5);`); + // Pick up the same css as the top bar label let label = new St.Label(); + let labelParent = new St.Widget({name: 'panel'}); + let labelParent2 = new St.Widget({style_class: 'panel-button'}); + for (let p of [labelParent, labelParent2]) { + p.style = ` + background-color: transparent; + border-image: none; + background-image: none + `; + } + labelParent.add_actor(labelParent2); + labelParent2.add_actor(label); this.label = label; label.hide(); - label.set_style('font-feature-settings: "tnum";'); let selection = new St.Widget({name: 'selection', style_class: 'tile-preview'}); @@ -169,7 +180,7 @@ class Space extends Array { clip.add_actor(actor); actor.add_actor(this.shadow); this.shadow.add_actor(background); - actor.add_actor(label); + actor.add_actor(labelParent); actor.add_actor(cloneClip); cloneClip.add_actor(cloneContainer);