summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxVerevkin <maxxverrr@gmail.com>2023-08-21 16:56:40 +0300
committerMaxVerevkin <maxxverrr@gmail.com>2023-08-21 16:56:40 +0300
commitf27d993243848727249e083f3dc13c471ca856e1 (patch)
tree5cd9ddfd177e579db44d756bf2dfc6c4aba8d41e
parentd1fe8e5999a5b16cfed7519f80b9710a7fbe1411 (diff)
downloadi3bar-mango-f27d993243848727249e083f3dc13c471ca856e1.tar.gz
clip status line instead of overflowing
-rw-r--r--src/bar.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bar.rs b/src/bar.rs
index b0c9e83..eeb633d 100644
--- a/src/bar.rs
+++ b/src/bar.rs
@@ -288,6 +288,9 @@ fn render_blocks(
full_width: f64,
full_height: f64,
) {
+ context.rectangle(offset_left, 0.0, full_width - offset_left, full_height);
+ context.clip();
+
struct LogialBlock<'a> {
blocks: Vec<&'a ComputedBlock>,
delta: f64,
@@ -406,6 +409,8 @@ fn render_blocks(
blocks_width -= w;
}
}
+
+ context.reset_clip();
}
pub fn compute_tag_label(label: &str, config: &Config) -> ComputedText {