fix: Remove extra scaling of borders

This commit is contained in:
Peter Krull 2025-03-08 20:18:53 +01:00 committed by Victoria Brekenfeld
parent 95b27637ae
commit ad2cba324e
4 changed files with 0 additions and 22 deletions

View file

@ -185,7 +185,6 @@ impl IndicatorShader {
key: impl Into<Key>, key: impl Into<Key>,
mut element_geo: Rectangle<i32, Local>, mut element_geo: Rectangle<i32, Local>,
thickness: u8, thickness: u8,
scale: f64,
alpha: f32, alpha: f32,
active_window_hint: [f32; 3], active_window_hint: [f32; 3],
) -> PixelShaderElement { ) -> PixelShaderElement {
@ -200,7 +199,6 @@ impl IndicatorShader {
thickness, thickness,
thickness * 2, thickness * 2,
alpha, alpha,
scale,
active_window_hint, active_window_hint,
) )
} }
@ -212,12 +210,8 @@ impl IndicatorShader {
thickness: u8, thickness: u8,
radius: u8, radius: u8,
alpha: f32, alpha: f32,
scale: f64,
color: [f32; 3], color: [f32; 3],
) -> PixelShaderElement { ) -> PixelShaderElement {
let thickness = (thickness as f64 * scale).round() as u8;
let radius = (radius as f64 * scale).round() as u8;
let settings = IndicatorSettings { let settings = IndicatorSettings {
thickness, thickness,
radius, radius,

View file

@ -125,7 +125,6 @@ impl MoveGrabState {
) )
.as_local(), .as_local(),
self.indicator_thickness, self.indicator_thickness,
output_scale.x,
alpha, alpha,
[ [
active_window_hint.red, active_window_hint.red,
@ -159,7 +158,6 @@ impl MoveGrabState {
thickness, thickness,
theme.radius_s()[0] as u8, // TODO: Fix once shaders support 4 corner radii customization theme.radius_s()[0] as u8, // TODO: Fix once shaders support 4 corner radii customization
1.0, 1.0,
output_scale.x,
[ [
active_window_hint.red, active_window_hint.red,
active_window_hint.green, active_window_hint.green,

View file

@ -1576,7 +1576,6 @@ impl FloatingLayout {
Key::Window(Usage::FocusIndicator, elem.key()), Key::Window(Usage::FocusIndicator, elem.key()),
geometry, geometry,
indicator_thickness, indicator_thickness,
output_scale,
alpha, alpha,
[ [
active_window_hint.red, active_window_hint.red,

View file

@ -3346,7 +3346,6 @@ impl TilingLayout {
None, None,
1.0, 1.0,
overview.alpha().unwrap(), overview.alpha().unwrap(),
1.0,
placeholder_id, placeholder_id,
Some(None), Some(None),
None, None,
@ -4002,7 +4001,6 @@ impl TilingLayout {
// but for that we have to associate focus with a tree (and animate focus changes properly) // but for that we have to associate focus with a tree (and animate focus changes properly)
1.0 - transition, 1.0 - transition,
transition, transition,
output_scale,
&self.placeholder_id, &self.placeholder_id,
is_mouse_tiling, is_mouse_tiling,
swap_desc.clone(), swap_desc.clone(),
@ -4040,7 +4038,6 @@ impl TilingLayout {
seat, seat,
transition, transition,
transition, transition,
output_scale,
&self.placeholder_id, &self.placeholder_id,
is_mouse_tiling, is_mouse_tiling,
swap_desc.clone(), swap_desc.clone(),
@ -4153,7 +4150,6 @@ impl TilingLayout {
// but for that we have to associate focus with a tree (and animate focus changes properly) // but for that we have to associate focus with a tree (and animate focus changes properly)
1.0 - transition, 1.0 - transition,
transition, transition,
output_scale,
&self.placeholder_id, &self.placeholder_id,
is_mouse_tiling, is_mouse_tiling,
swap_desc.clone(), swap_desc.clone(),
@ -4189,7 +4185,6 @@ impl TilingLayout {
seat, seat,
transition, transition,
transition, transition,
output_scale,
&self.placeholder_id, &self.placeholder_id,
is_mouse_tiling, is_mouse_tiling,
swap_desc.clone(), swap_desc.clone(),
@ -4264,7 +4259,6 @@ fn geometries_for_groupview<'a, R>(
seat: Option<&Seat<State>>, seat: Option<&Seat<State>>,
alpha: f32, alpha: f32,
transition: f32, transition: f32,
output_scale: f64,
placeholder_id: &Id, placeholder_id: &Id,
mouse_tiling: Option<Option<&TargetZone>>, mouse_tiling: Option<Option<&TargetZone>>,
swap_desc: Option<NodeDesc>, swap_desc: Option<NodeDesc>,
@ -4465,7 +4459,6 @@ where
4, 4,
if render_active_child { 16 } else { 8 }, if render_active_child { 16 } else { 8 },
alpha * if render_potential_group { 0.40 } else { 1.0 }, alpha * if render_potential_group { 0.40 } else { 1.0 },
output_scale,
group_color, group_color,
) )
.into(), .into(),
@ -4483,7 +4476,6 @@ where
4, 4,
8, 8,
alpha * 0.40, alpha * 0.40,
output_scale,
group_color, group_color,
) )
.into(), .into(),
@ -4547,7 +4539,6 @@ where
4, 4,
8, 8,
alpha * 0.15, alpha * 0.15,
output_scale,
group_color, group_color,
) )
.into(), .into(),
@ -4784,7 +4775,6 @@ where
4, 4,
8, 8,
alpha * 0.40, alpha * 0.40,
output_scale,
group_color, group_color,
) )
.into(), .into(),
@ -5008,7 +4998,6 @@ where
Key::Window(Usage::FocusIndicator, mapped.clone().key()), Key::Window(Usage::FocusIndicator, mapped.clone().key()),
geo, geo,
indicator_thickness, indicator_thickness,
output_scale,
alpha, alpha,
[window_hint.red, window_hint.green, window_hint.blue], [window_hint.red, window_hint.green, window_hint.blue],
), ),
@ -5276,7 +5265,6 @@ where
Key::Static(swapping_stack_surface_id.clone()), Key::Static(swapping_stack_surface_id.clone()),
swap_geo, swap_geo,
4, 4,
output_scale,
transition.unwrap_or(1.0), transition.unwrap_or(1.0),
[window_hint.red, window_hint.green, window_hint.blue], [window_hint.red, window_hint.green, window_hint.blue],
), ),
@ -5369,7 +5357,6 @@ where
} else { } else {
indicator_thickness indicator_thickness
}, },
output_scale,
alpha, alpha,
[window_hint.red, window_hint.green, window_hint.blue], [window_hint.red, window_hint.green, window_hint.blue],
)); ));