Remove the forge "unfocused-border" patch
The patch rewrote forge's window.js with `sed`/`awk` anchored on exact upstream lines, making it the most fragile piece of the repository, for a purely cosmetic hairline on unfocused windows. This also simplifies a future migration away from forge.
This commit is contained in:
parent
ff5713a91a
commit
86cce2d9cf
5 changed files with 9 additions and 111 deletions
|
|
@ -157,14 +157,10 @@ _LIGHTNESS_RESOLUTION = 0.001
|
|||
# Corner geometry:
|
||||
# - Windows are clipped to `WINDOW_RADIUS`
|
||||
# by the rounded-window-corners-reborn extension
|
||||
# - forge's stock focused rings sit `FOCUSED_INSET` outside the frame,
|
||||
# while the patched unfocused hairline sits `BORDER_INSET` outside
|
||||
# => Flush rings need radius + their own inset
|
||||
# - `BORDER_INSET` must match ~/.local/bin/gnome-shell-extension-forge-patch
|
||||
# - `FOCUSED_INSET` must match `inset` in forge's window.js (currently 3)
|
||||
# - forge's rings sit slightly outside the window frame
|
||||
# => The ring radius adds 1px so the curves stay concentric
|
||||
# (forge's stock inset is actually 3; see window.js)
|
||||
WINDOW_RADIUS = 12
|
||||
BORDER_INSET = 1
|
||||
FOCUSED_INSET = 3
|
||||
|
||||
|
||||
# Template for the stylesheet used by the GNOME shell extension `forge`
|
||||
|
|
@ -174,16 +170,6 @@ FORGE_CSS = textwrap.dedent("""\
|
|||
/* accent={accent_name} scheme={scheme_name} */
|
||||
}}
|
||||
|
||||
.window-unfocused-border {{
|
||||
/* Unfocused windows are marked by a hairline only: */
|
||||
/* - Shadows from rounded-window-corners-reborn carry the focus distinction */
|
||||
/* - Width is kept > 0 so the patched border code in forge stays exercised */
|
||||
border-width: 1px;
|
||||
border-color: {chrome_quiet};
|
||||
border-style: solid;
|
||||
border-radius: {unfocused_ring_radius};
|
||||
}}
|
||||
|
||||
.tiled {{
|
||||
color: {text};
|
||||
opacity: 1;
|
||||
|
|
@ -836,8 +822,7 @@ def render_forge_css(colors: dict[str, str]) -> str:
|
|||
emphasis_dim=as_rgb(colors["emphasis-dim"]),
|
||||
emphasis_dim_a30=as_rgba(colors["emphasis-dim"], alpha=0.3),
|
||||
emphasis_dim_a40=as_rgba(colors["emphasis-dim"], alpha=0.4),
|
||||
ring_radius=f"{WINDOW_RADIUS + FOCUSED_INSET}px",
|
||||
unfocused_ring_radius=f"{WINDOW_RADIUS + BORDER_INSET}px",
|
||||
ring_radius=f"{WINDOW_RADIUS + 1}px",
|
||||
scheme_name=colors["_scheme"],
|
||||
surface_dim=as_rgb(colors["surface-dim"]),
|
||||
surface_dim_a60=as_rgba(colors["surface-dim"], alpha=0.6),
|
||||
|
|
|
|||
Loading…
Reference in a new issue