From edde84f0fc626f2b39303b07a050925a03b28963 Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Sun, 21 Feb 2021 13:08:20 +0100 Subject: [PATCH] Performance: reduce amount of top shadow offscreen rendering --- css/styles.css | 11 ++++++++--- src/revealers.js | 4 +++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/css/styles.css b/css/styles.css index da6eba0b..171173eb 100644 --- a/css/styles.css +++ b/css/styles.css @@ -102,12 +102,17 @@ radio { font-size: 23px; text-shadow: none; } -.revealertop { +.revealertopbox { background: transparent; } .tvmode .revealertop { - min-height: 88px; - box-shadow: inset 0px 200px 10px -132px rgba(0,0,0,0.4); + box-shadow: 0px 0px 10px 10px rgba(0,0,0,0.4); +} +.tvmode .revealertopbox { + margin-bottom: -8px; + background: rgba(0,0,0,0.4); +} +.tvmode .revealertopgrid { font-family: 'Cantarell', sans-serif; font-size: 28px; font-weight: 500; diff --git a/src/revealers.js b/src/revealers.js index d05824aa..6473fb60 100644 --- a/src/revealers.js +++ b/src/revealers.js @@ -48,6 +48,7 @@ class ClapperRevealerTop extends CustomRevealer valign: Gtk.Align.START, }); this.revealerName = 'top'; + this.add_css_class('revealertop'); const initTime = GLib.DateTime.new_now_local().format('%X'); this.timeFormat = (initTime.length > 8) @@ -80,7 +81,7 @@ class ClapperRevealerTop extends CustomRevealer orientation: Gtk.Orientation.VERTICAL, }); revealerBox.add_css_class('osd'); - revealerBox.add_css_class('revealertop'); + revealerBox.add_css_class('revealertopbox'); this.headerBar = new HeaderBar(); revealerBox.append(this.headerBar); @@ -89,6 +90,7 @@ class ClapperRevealerTop extends CustomRevealer column_spacing: 8, visible: false, }); + this.revealerGrid.add_css_class('revealertopgrid'); this.revealerGrid.attach(this.mediaTitle, 0, 0, 1, 1); this.revealerGrid.attach(this.currentTime, 1, 0, 1, 1); this.revealerGrid.attach(this.endTime, 1, 0, 1, 1);