wayvr: improve grid shader, dash-frontend: make pop-up title non-scrollable

This commit is contained in:
Aleksander 2026-04-22 20:22:45 +02:00
parent 07bd841bc6
commit f3732c7087
5 changed files with 44 additions and 20 deletions

View File

@ -86,7 +86,8 @@
round="8" round="8"
flex_grow="1" flex_grow="1"
width="100%" width="100%"
overflow_y="scroll" overflow="scroll"
position="relative"
> >
<!-- radial gradient --> <!-- radial gradient -->
<rectangle <rectangle

View File

@ -9,6 +9,7 @@
width="100%" width="100%"
height="100%" height="100%"
flex_direction="column" flex_direction="column"
position="absolute"
> >
<!-- Top black bar --> <!-- Top black bar -->
<rectangle <rectangle
@ -32,14 +33,18 @@
</div> </div>
</rectangle> </rectangle>
<!-- Content --> <rectangle
<rectangle height="100%" width="100%"
height="100%"
color="#010310fe" color="#010310fe"
color2="#051c55fc" color2="#051c55fc"
gradient="vertical" gradient="vertical"
padding="16" position="relative"
id="content"> >
<div id="content" padding="16" width="100%" height="100%" position="absolute" overflow_y="scroll">
<!-- Content, filled-in at runtime -->
</div>
</rectangle> </rectangle>
</div> </div>
</elements> </elements>
</layout> </layout>

View File

@ -475,7 +475,6 @@ impl SettingType {
| Self::UiGradientIntensity | Self::UiGradientIntensity
| Self::UprightScreenFix | Self::UprightScreenFix
| Self::DoubleCursorFix | Self::DoubleCursorFix
| Self::ScreenRenderDown
| Self::Language | Self::Language
| Self::CaptureMethod | Self::CaptureMethod
) )

View File

@ -1,18 +1,37 @@
#version 310 es #version 310 es
precision highp float; precision highp float;
layout (location = 0) in vec2 in_uv; layout(location = 0) in vec2 in_uv;
layout (location = 0) out vec4 out_color; layout(location = 0) out vec4 out_color;
void main() const float circle_smoothness = 0.0025;
{ const float circle_thickness = 0.01;
float fade = max(1.0 - 2.0 * length(in_uv.xy + vec2(-0.5, -0.5)), 0.0); const float circle_opacity = 0.3;
float grid; const float circle_size = 0.1;
if (fract(in_uv.x / 0.0005) < 0.01 || fract(in_uv.y / 0.0005) < 0.01) { float calc_grid(vec2 coord, float m) {
grid = 1.0; vec2 grid = fract(coord * m);
} else { return (step(m, grid.x) * step(m, grid.y));
grid = 0.0; }
}
out_color = vec4(1.0, 1.0, 1.0, grid * fade); float calc_circle(float dist, float size) {
float c1 = size;
float c2 = size - circle_thickness;
return smoothstep(c1, c1 - circle_smoothness, dist) *
smoothstep(c2 - circle_smoothness, c2, dist);
}
void main() {
float dist = length(in_uv.xy + vec2(-0.5, -0.5));
float fade = max(1.0 - 2.0 * dist, 0.0);
float mask = 1.0 - calc_grid(in_uv.xy * 1000.0, 0.02);
mask = max(mask, (calc_circle(dist, circle_size) +
calc_circle(dist, circle_size * 2.0) +
calc_circle(dist, circle_size * 3.0)) *
circle_opacity);
out_color = vec4(1.0, 1.0, 1.0, mask * fade);
} }

View File

@ -8,7 +8,7 @@ use crate::{
globals::WguiGlobals, globals::WguiGlobals,
i18n::Translation, i18n::Translation,
layout::Layout, layout::Layout,
parser::{self, Fetchable, ParserData, ParserState}, parser::{self, Fetchable, ParserState},
task::Tasks, task::Tasks,
windowing::window::{WguiWindow, WguiWindowParams, WguiWindowParamsExtra}, windowing::window::{WguiWindow, WguiWindowParams, WguiWindowParamsExtra},
}; };