Skip to content

Add PolyGlass themes - #1289

Merged
Wyvest merged 13 commits into
v1from
feat/frosted-polyglass
Nov 6, 2026
Merged

Wyvest merged 13 commits into
v1from
feat/frosted-polyglass

Conversation

@Deftu

@Deftu Deftu commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

New PolyGlass dark and light themes with real frosted glass behind the menus. The old PolyGlass is now called Polyfrosted. Tested in game on everything from 1.8.9 to 26.3.

Wyvest
Wyvest previously requested changes Nov 2, 2026

@Wyvest Wyvest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call (old) polyglass "polyfrosted", call new theme "polyglass"

@Deftu Deftu changed the title Add Frosted Polyglass themes Add PolyGlass themes Nov 2, 2026
@Deftu
Deftu requested a review from Wyvest November 2, 2026 14:54
@lunaynx
lunaynx force-pushed the feat/frosted-polyglass branch from fe8cf17 to 4568fd4 Compare November 3, 2026 01:54
updateAccent()
try {
val theme = registry.find { it.name == ThemeConfig.activeTheme }
val saved = if (ThemeConfig.polyfrostedRenameApplied) ThemeConfig.activeTheme else renamedThemes[ThemeConfig.activeTheme] ?: ThemeConfig.activeTheme

@lunaynx lunaynx Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 [P2] Reset the migration marker when opening an old profile

When an old profile is opened after another profile has been migrated, its themes.json has no polyfrostedRenameApplied field, so profile rebinding retains the previous profile’s true value. This skips the rename and loads the new PolyGlass theme instead of the saved old appearance; the next save also records the marker. Reset or derive the marker from the incoming profile before resolving its theme.

Screenshots
Image
An old light-theme profile selects PolyGlass instead of Polyfrosted

Comment on lines +20 to +24
fun Color.scaleOpacity(percent: Float, defaultPercent: Float): Color =
copy(alpha = (alpha * percent / defaultPercent).coerceIn(0f, 1f))

fun UITheme.surfaceOpacity(color: Color, percent: Float, defaultPercent: Float): Color =
if (liquidGlass) color.scaleOpacity(percent, defaultPercent) else color.withOpacityPercent(percent)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 [P2] Make 100% opacity opaque for PolyGlass

With either PolyGlass theme active, setting Page Opacity or Sidebar Opacity to 100 still leaves the panel translucent: for example, the dark page reaches only about 62% alpha. The settings explicitly promise that 100 is fully opaque, so users cannot hide the game background as requested. Map the maximum to full opacity while retaining the desired default appearance.

Screenshots
Image
Both opacity settings at 100 while the world remains visible

Comment on lines +20 to +23
val GLASS_DARK: OneConfigUITheme by lazy { componentsBridge().glassDark() }

@JvmStatic
val GLASS_LIGHT: OneConfigUITheme by lazy { componentsBridge().glassLight() }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 [P3] Update the PolyPlus toggle for the new glass variants (non-blocking)

When PolyGlass Light is active, PolyPlus’s main-menu theme toggle recognizes only the legacy light theme and Minecraft Light, so it treats PolyGlass Light as dark. Clicking the toggle then selects Polyfrosted Light rather than a dark theme; toggling from PolyGlass Dark also leaves the glass family. Coordinate an update to the PolyPlus toggle and its applyTheme function so they recognize and preserve the new variants.

Comment on lines +170 to +174
fun endFrame() {
if (GuiTargetRedirect.target != null) return
submitted = false
drawBounds.clear()
glassDraws.clear()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 [P2] Release the backdrop texture after glass is no longer used

After a PolyGlass panel is opened on Minecraft 1.21.11 or newer, the full-window backdrop texture and view remain allocated even after the menu closes or the theme changes. At 4K this retains roughly 32 MiB of GPU memory for the rest of the session. Release the snapshot after an idle period or when it is no longer needed, and recreate it on demand.

@Deftu
Deftu requested a review from lunaynx November 5, 2026 09:48
@Wyvest
Wyvest merged commit 76b4c49 into v1 Nov 6, 2026
12 checks passed
@Wyvest
Wyvest deleted the feat/frosted-polyglass branch November 6, 2026 06:42
@github-project-automation github-project-automation Bot moved this to Done in OneConfig Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants