From b2626cecaa5da25d37b66a83b90fe7c0c280a88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Thu, 5 May 2022 18:37:21 +0200 Subject: [PATCH] Clip around the active tab --- lapce-ui/src/window.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lapce-ui/src/window.rs b/lapce-ui/src/window.rs index 31912193..8f5a16f2 100644 --- a/lapce-ui/src/window.rs +++ b/lapce-ui/src/window.rs @@ -534,7 +534,10 @@ fn paint(&mut self, ctx: &mut PaintCtx, data: &LapceWindowData, env: &Env) { } } - self.tabs[data.active].paint(ctx, data, env); + ctx.with_save(|ctx| { + ctx.clip(self.tabs[data.active].layout_rect()); + self.tabs[data.active].paint(ctx, data, env); + }); let line_color = data.config.get_color_unchecked(LapceTheme::LAPCE_BORDER); if self.tabs.len() > 1 {