Commit graph

23 commits

Author SHA1 Message Date
alexei-zebra
c269d6efb3
Give the Wayland window an Adwaita-like frame
The engine-drawn title bar grew to 48 px with 24x24 window controls,
12 px away from the edge and from each other, all sharing one hover
highlight. The controls use textures now (gui/cross, gui/minimize_w,
gui/maximize_w and gui/restore_w when maximized) with the vector icons
kept as a fallback, and the title is centred in the bar, clamped to the
free space between the button groups.

The bar now sits inside invisible margins that carry a drop shadow, so
the window is resizable from outside the visible frame: the surface is
content plus twice SHADOW_MARGIN and xdg_surface.set_window_geometry
tells the compositor which part is the window. The shadow follows
Adwaita's window shadow: a Gaussian blur of 7 px (sigma 3.5) expanded by
1 px, rgba(0,0,0,0.5) focused and 0.3 in the backdrop, plus a 1 px
hairline, symmetric on all four sides - a 16 px wide frame would show a
fatter tail than the reference. Margins exist only while the window is
decorated by us and not maximized or fullscreen.

The engine composes the frame itself: it renders exactly as before, then
the backend copies the frame into a texture, clears the surface, draws
the shadow and puts the content in place with alpha forced to 1, which
keeps the frame opaque without touching a single render pass. Only
frames the engine actually drew are cached, and the EGL window is
resized before its surface size is asked for, so no frame is composed
from a buffer the compositor just replaced - that was the one frame
blink after a resize.

Resize cursors match GNOME: directional shapes for edges and corners
(w/e/n/s/ne/nw/se/sw) instead of the double-headed diagonals, with the
extra CursorShape values appended so the existing GLFW indices stay.

Measured: window 1123x751 opens as saved, fullscreen round trip returns
the same size with the settings untouched, the shadow alpha profile is
0.20/0.10/0.03 at 1/4/7 px from the edge against Adwaita's 0.21/0.095/
0.055, all four sides equal, menu layout baseline unchanged (706),
no errors in the log.
2026-10-10 12:23:41 +03:00
Xertis
1f0b6f0d9d Qol settings.controls update 2025-08-04 20:50:27 +03:00
MihailRis
4761c520d5 feat: component script reloading 2025-03-16 22:03:37 +03:00
MihailRis
6fb14ee0a4 feat: reloading hud scripts 2025-03-15 21:12:19 +03:00
MihailRis
f9998f0a93 feat: world script reloading 2025-03-14 17:07:10 +03:00
MihailRis
bcbfdd50c7 feat: running files with and block/item script reload 2025-03-13 22:08:22 +03:00
MihailRis
b66937c61d feat: scripts classification 2025-03-13 00:28:40 +03:00
MihailRis
fb18442322 update console layout 2025-03-12 18:00:28 +03:00
MihailRis
3d60777a12 feat: save edited files 2025-03-12 17:08:50 +03:00
MihailRis
e70746ae43 update console layout 2025-03-11 03:48:27 +03:00
Xertis
a5aaddb379 add suggestive signs 2025-01-03 18:07:01 +03:00
Xertis
a1a4fc97fc add icons 2025-01-02 23:31:15 +03:00
Xertis
2018b2f8a4 add content_config 2024-11-28 22:26:48 +03:00
MihailRis
5915b811f2 new content menu (WIP) 2024-05-02 04:07:07 +03:00
MihailRis
b1a79e3a6e block.material + minor refactor 2024-04-25 05:12:45 +03:00
MihailRis
6e2bc9ca95 world previews demo 2024-04-23 01:09:30 +03:00
MihailRis
3862dbda66 contentpack remove feature WIP 2024-02-29 23:47:07 +03:00
MihailRis
ef81a024c9 new crosshair + minor refactor 2024-02-14 04:38:34 +03:00
MihailRis
939f1a7d75 added error and warning icons 2024-02-05 05:02:22 +03:00
MihailRis
acacb88c66 no_icon.png size reduced 2024-01-27 00:37:11 +03:00
MihailRis
c57b2d0de3 Content menu, content-pack dependencies 2024-01-27 00:36:18 +03:00
A-lex-Ra
42f3271f54 upd delete_icon.png 2024-01-19 20:33:35 +06:00
MihailRis
9119caca65 Delete world feature 2024-01-18 04:06:27 +03:00