mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 14:35:41 +00:00
Linux: session-native GDK/WebKit mitigations and in-page browse scroll (#731)
* feat(linux): session GDK defaults, nvidia-quirk, optional x11-legacy wrap Ship PSYSONIC_ALLOW_NATIVE_GDK from Nix/AUR instead of pinning WEBKIT_DISABLE_* and GDK x11. Add flake psysonic-x11-legacy for the old wrap; alias gdk-session to psysonic. Startup uses webkit2gtk-nvidia-quirk and Wayland-aware compositing; refresh Help (a45) and nixos-install docs. * fix(linux): session GDK and nvidia-quirk only; drop wrapper env heuristics Remove PSYSONIC_ALLOW_NATIVE_GDK and devShell GDK/WEBKIT exports; stop synthesizing GDK/WebKit vars in main.rs. Update Nix/AUR wrappers, install docs, CHANGELOG, and help FAQ with practical user-facing workarounds. * fix(linux): X11-pinned GDK uses DMABUF quirk path, not Wayland explicit-sync When GDK_BACKEND is forced to x11 on a wayland user session, webkit2gtk-nvidia-quirk would still apply __NV_DISABLE_EXPLICIT_SYNC and gray out the webview. Map that case to WEBKIT_DISABLE_DMABUF_RENDERER like native X11. * fix(ui): stabilize WebKitGTK/Wayland hover paint for nav and media cards Sidebar nav links avoid transition:all and promote icons with translateZ(0). Artist rows and album/artist/song cards use compositing hints; card shadows and borders no longer interpolate so cover zoom can stay smooth without jitter. * fix(ui): isolate artist/album card text and cover paint on WebKitGTK Promote cover blocks with contain/paint and text stacks with translateZ(0); use artist-card-info on the artists grid for the same layout as other cards. * feat(artists): in-page overlay scroll and locked main viewport Move list/grid into an inner OverlayScrollArea, stop sticky toolbar from owning the route scroll, align the rail with the main panel edge, and skip the main-route overlay thumb when the viewport cannot scroll vertically. * feat(browse): extend in-page overlay scroll to more library routes Reuse the locked main viewport pattern from Artists for Albums, Composers, Lossless albums, and New releases; wire VirtualCardGrid and scroll chrome to the matching in-page viewport ids. * fix(linux): improve Wayland GPU compositing text clarity in WebKitGTK Use on-demand hardware acceleration on main and mini webviews when the session is Wayland and compositing stays on; gate subpixel body AA on the same conditions via new Tauri probes. Document PSYSONIC_SKIP_WAYLAND_FONT_TUNING for opt-out and changelog. * fix(rust): satisfy clippy needless_return in Linux webkit helpers * fix(linux): tune Wayland text rendering with HW policy env and CSS Allow PSYSONIC_WEBKIT_WAYLAND_HW_POLICY to select WebKit hardware acceleration policy (never/always vs default on-demand). Extend Wayland font CSS to #root with geometricPrecision and text-size-adjust on html. * feat(linux): Wayland text presets in settings, safe WebKit apply, CPU default Persist profile to app config; apply WebKit policy at startup/mini only to avoid WebKitGTK hangs on live toggles. UI + CSS preview stays live; default preset is sharp (CPU-friendly). * fix(linux): map Wayland sharp preset to OnDemand WebKit policy HardwareAccelerationPolicy::Never at startup broke main-viewport wheel scrolling on WebKitGTK+Wayland; sharp vs balanced remains a CSS AA path. Use PSYSONIC_WEBKIT_WAYLAND_HW_POLICY for a true Never policy. * fix(rust): gate Linux-only Wayland WebKit helpers for Windows builds Re-export startup helpers only under cfg(linux) and drop non-Linux stubs so Windows compiles without unused-import and dead-code warnings. * chore(release): CHANGELOG + credits for Linux session/WebKit work (PR #731) Consolidate scattered incremental changelog notes into two [1.47.0] entries with PR link; remove duplicate Linux blocks from [1.46.0] Fixed. Append settings credit line for cucadmuh.
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
border-radius: var(--radius-lg);
|
||||
overflow: hidden;
|
||||
box-shadow: inset 0 0 0 1px var(--border-subtle);
|
||||
transition: transform var(--transition-base), box-shadow var(--transition-base);
|
||||
/* Instant shadow change — same WebKitGTK jitter as animated box-shadow on .artist-card. */
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.album-card:hover {
|
||||
@@ -18,6 +19,9 @@
|
||||
aspect-ratio: 1;
|
||||
overflow: hidden;
|
||||
background: var(--bg-hover);
|
||||
contain: paint;
|
||||
isolation: isolate;
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.album-card-cover img {
|
||||
@@ -25,12 +29,12 @@
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
transform-origin: center center;
|
||||
transform: scale(1);
|
||||
transform: translateZ(0) scale(1);
|
||||
transition: opacity 0.15s ease, transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.album-card:hover .album-card-cover img {
|
||||
transform: scale(1.02);
|
||||
transform: translateZ(0) scale(1.02);
|
||||
}
|
||||
|
||||
.album-card-cover-placeholder {
|
||||
@@ -42,3 +46,6 @@
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.album-card-info {
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
border: 1px solid var(--border-subtle);
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
|
||||
/* Instant border/shadow: animated box-shadow jitters on WebKitGTK/Wayland; cover zoom stays smooth below. */
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.artist-card:hover {
|
||||
@@ -24,6 +25,9 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--text-muted);
|
||||
contain: paint;
|
||||
isolation: isolate;
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.artist-card-avatar img {
|
||||
@@ -31,12 +35,12 @@
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
transform-origin: center center;
|
||||
transform: scale(1);
|
||||
transform: translateZ(0) scale(1);
|
||||
transition: opacity 0.15s ease, transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.artist-card:hover .artist-card-avatar img {
|
||||
transform: scale(1.02);
|
||||
transform: translateZ(0) scale(1.02);
|
||||
}
|
||||
|
||||
.artist-card-avatar-initial {
|
||||
@@ -64,6 +68,11 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.artist-card-info--center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.artist-card-name {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* ─ Artists Page ─ */
|
||||
|
||||
.letter-heading {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
@@ -23,6 +24,7 @@
|
||||
padding: var(--space-3);
|
||||
border-radius: var(--radius-md);
|
||||
transition: background var(--transition-fast);
|
||||
transform: translateZ(0);
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
@@ -67,4 +69,3 @@
|
||||
color: var(--text-muted);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
|
||||
@@ -104,6 +104,87 @@
|
||||
contain: paint;
|
||||
}
|
||||
|
||||
/* Browse pages: in-page overlay scroller — main route viewport does not scroll. */
|
||||
.app-shell-route-scroll__viewport--inpage-split {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
/* Sticky toolbar + `OverlayScrollArea` body; shared by Artists, Albums, Composers, etc. */
|
||||
.content-body.mainstage-inpage-split {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
padding-right: 0;
|
||||
transition: padding-top 0.2s ease;
|
||||
}
|
||||
|
||||
.mainstage-inpage-split .mainstage-inpage-toolbar {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.content-body.mainstage-inpage-split .page-sticky-header {
|
||||
position: relative;
|
||||
top: auto;
|
||||
z-index: auto;
|
||||
margin-right: 0;
|
||||
transition: padding 0.2s ease;
|
||||
}
|
||||
|
||||
.content-body.mainstage-inpage-split.mainstage-inpage--header-tight {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.content-body.mainstage-inpage-split.mainstage-inpage--header-tight .page-sticky-header {
|
||||
padding-top: var(--space-2);
|
||||
padding-bottom: var(--space-2);
|
||||
}
|
||||
|
||||
.content-body.mainstage-inpage-split.mainstage-inpage--header-tight .page-sticky-header .page-title {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
/* Toolbar rows: use these class names instead of inline gap so tight mode can tighten. */
|
||||
.mainstage-inpage-toolbar-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.content-body.mainstage-inpage-split.mainstage-inpage--header-tight .mainstage-inpage-toolbar-row {
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.mainstage-inpage-toolbar-alpha-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.25rem;
|
||||
margin-top: var(--space-4);
|
||||
}
|
||||
|
||||
.content-body.mainstage-inpage-split.mainstage-inpage--header-tight .mainstage-inpage-toolbar-alpha-row {
|
||||
margin-top: var(--space-2);
|
||||
}
|
||||
|
||||
.content-body.mainstage-inpage-split.mainstage-inpage--header-tight .artists-alpha-btn {
|
||||
padding: 0.15rem 0.4rem;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.content-body.mainstage-inpage-split > .mainstage-inpage-scroll.overlay-scroll {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.mainstage-inpage-scroll__viewport {
|
||||
padding-bottom: var(--space-6);
|
||||
padding-right: var(--space-6);
|
||||
}
|
||||
|
||||
/* Sticky page header: keeps page title + filter/search bar visible while the
|
||||
body scrolls. Negative horizontal margins (+ matching padding) make the
|
||||
background flush with the scroll container edges so the sticky block looks
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
color: var(--text-secondary);
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
transition: all var(--transition-fast);
|
||||
transition: background var(--transition-fast), color var(--transition-fast);
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
position: relative;
|
||||
@@ -313,6 +313,7 @@
|
||||
flex-shrink: 0;
|
||||
opacity: 0.7;
|
||||
transition: opacity var(--transition-fast);
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.nav-link.active svg,
|
||||
|
||||
@@ -59,3 +59,33 @@ ol {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* Linux Wayland + GPU compositing (WebKitGTK): grayscale body AA can look washed
|
||||
when surfaces are GL-composited; prefer LCD subpixel while compositing stays on. */
|
||||
html[data-platform="linux"][data-linux-session="wayland"]:not(.no-compositing) {
|
||||
-webkit-text-size-adjust: 100%;
|
||||
text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
html[data-platform="linux"][data-linux-session="wayland"]:not(.no-compositing):is(
|
||||
[data-wayland-text-profile="balanced"],
|
||||
[data-wayland-text-profile="gpu"]
|
||||
) body,
|
||||
html[data-platform="linux"][data-linux-session="wayland"]:not(.no-compositing):is(
|
||||
[data-wayland-text-profile="balanced"],
|
||||
[data-wayland-text-profile="gpu"]
|
||||
) #root {
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
-moz-osx-font-smoothing: auto;
|
||||
text-rendering: geometricPrecision;
|
||||
}
|
||||
|
||||
/* "Sharp" live preview: greyscale AA reads crisper on some GL-composited stacks (WebKit Never is applied on restart). */
|
||||
html[data-platform="linux"][data-linux-session="wayland"]:not(.no-compositing)[data-wayland-text-profile="sharp"]
|
||||
body,
|
||||
html[data-platform="linux"][data-linux-session="wayland"]:not(.no-compositing)[data-wayland-text-profile="sharp"]
|
||||
#root {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-rendering: geometricPrecision;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
border-radius: var(--radius-lg);
|
||||
overflow: hidden;
|
||||
box-shadow: inset 0 0 0 1px var(--border-subtle);
|
||||
transition: box-shadow var(--transition-base);
|
||||
}
|
||||
|
||||
.song-card:hover {
|
||||
|
||||
Reference in New Issue
Block a user