Performance: reduce amount of top shadow offscreen rendering

This commit is contained in:
Rafostar
2021-02-21 13:08:20 +01:00
committed by Rafał Dzięgiel
parent 46103e169f
commit edde84f0fc
2 changed files with 11 additions and 4 deletions

View File

@@ -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;

View File

@@ -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);