1
0
Fork 0
forked from wry/wry

theme: add bar-position setting

This commit is contained in:
Stipe Kotarac 2025-11-28 21:26:15 +01:00
parent 3ea687a5c8
commit 2500c05f70
15 changed files with 178 additions and 32 deletions

View file

@ -139,6 +139,8 @@ impl Renderer<'_> {
self.state.color_manager.srgb_gamma22(),
);
}
x += bar_rect.x1() - non_exclusive_rect_rel.x1();
y += bar_rect.y1() - non_exclusive_rect_rel.y1();
if let Some(status) = &rd.status
&& let Some(texture) = status.tex.texture()
{
@ -159,16 +161,12 @@ impl Renderer<'_> {
srgb_srgb,
);
}
{
x += bar_rect.x1() - non_exclusive_rect_rel.x1();
y += bar_rect.y1() - non_exclusive_rect_rel.y1();
for item in output.tray_items.iter() {
let data = item.data();
if data.surface.buffer.is_some() {
let rect = data.rel_pos.get().move_(x, y);
let bounds = self.base.scale_rect(rect);
self.render_surface(&data.surface, rect.x1(), rect.y1(), Some(&bounds));
}
for item in output.tray_items.iter() {
let data = item.data();
if data.surface.buffer.is_some() {
let rect = data.rel_pos.get().move_(x, y);
let bounds = self.base.scale_rect(rect);
self.render_surface(&data.surface, rect.x1(), rect.y1(), Some(&bounds));
}
}
}