summaryrefslogtreecommitdiffstats
path: root/src/ui/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/window.rs')
-rw-r--r--src/ui/window.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ui/window.rs b/src/ui/window.rs
index 7fddbb2..fa4f1e7 100644
--- a/src/ui/window.rs
+++ b/src/ui/window.rs
@@ -30,7 +30,7 @@ impl MsgWindow {
/// on the `grid` and `row`, we can't calculate the height automatically.
/// The height is mainly needed so we don't show any artifacts that
/// will likely be visible on the `grid`'s drawingarea from earlier renders.
- pub fn set_pos(&self, grid: &Grid, row: f64, h: f64) {
+ pub fn set_pos(&self, grid: &Grid, row: f64, h: f64, scrolled: bool) {
let w = grid.widget();
// Only add/change the child widget if its different
@@ -45,6 +45,13 @@ impl MsgWindow {
self.frame.add(&w);
}
+ let c = self.frame.get_style_context();
+ if scrolled {
+ c.add_class("scrolled");
+ } else {
+ c.remove_class("scrolled");
+ }
+
let metrics = grid.get_grid_metrics();
let w = metrics.cols * metrics.cell_width;
self.frame