Add BlurTransparentTitleBar and MatchInactiveTitleBar options#342
Open
ItxFilas wants to merge 1 commit into
Open
Add BlurTransparentTitleBar and MatchInactiveTitleBar options#342ItxFilas wants to merge 1 commit into
ItxFilas wants to merge 1 commit into
Conversation
… bugs New options: - BlurTransparentTitleBar: syncs titlebar alpha to ToolBarOpacity so the titlebar and toolbar form one seamless blurred surface under KWin - MatchInactiveTitleBar: keeps active titlebar colors on unfocused windows so inactive windows don't appear lighter or washed out Bug fixes: - titleBarColor(): hideTitleBar now returns early before alpha is applied (Bali10050#3, Bali10050#4); matchInactiveTitleBar no longer kills the focus animation (Bali10050#2); alpha written unconditionally so semi-transparent themes aren't darkened further (Bali10050#6); ToolBarOpacity read live from KSharedConfig instead of a stale cached member (Bali10050#5); integer rounding fixed with qRound + float division (Bali10050#7); m_titleBarAlpha member removed - updateBlur(): deduplicated setOpaque block hoisted before the floating- titlebar branch (Bali10050#8) - paintTitleBar(): titleBarColor() computed once per frame instead of four times (Bali10050#9) - darklystyle.cpp: added widget null guard before widget->window() in the Dolphin tab-frame translucency path to prevent crash in QML contexts (Bali10050#1) - darklyconfigurationui.ui: matchInactiveTitleBar row corrected from 10 to 8 so checkboxes appear without a gap (Bali10050#10)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New options
Transparent, blurred title bar
Adds a Transparent, blurred title bar checkbox in the General tab of the decoration settings.
When enabled, the titlebar alpha is synced to the
ToolBarOpacityvalue fromdarklyrc(the same setting that controls the toolbar/tab bar transparency in Application Style). This makes the titlebar and the toolbar form one seamless blurred surface under KWin compositing — no visible seam between them.The opacity is read live from
KSharedConfigon every paint, so changes toToolBarOpacitytake effect immediately without re-login.Use active titlebar colors for inactive windows
Adds a Use active titlebar colors for inactive windows checkbox.
When enabled, unfocused windows keep the active titlebar color instead of fading to the inactive palette, so windows don't appear washed out or lighter when not in focus.
Bug fixes
These were found and fixed while implementing the above:
widget &&guard added beforewidget->window()indarklystyle.cpp; Qt can call style primitives withwidget == nullptrin QML contextsmatchInactiveTitleBarkilled the focus-change animation — moved after the animation guard so the timer runs a no-op instead of cross-fading between two identical active colorshideTitleBarwas on —hideTitleBarnow returns early before the alpha blockhideTitleBar + matchInactiveproduced wrong blur threshold — same early return fixes thism_titleBarAlphawas stale — replaced with a liveKSharedConfigread;KSharedConfig::openConfiguses a shared in-process cache so this is O(1)color.alpha() > m_titleBarAlphaguard so semi-transparent themes are correctly raised to matchToolBarOpacityqRound(opacity * 255.0 / 100)with float division replaces integer truncationupdateBlur()had an identicalsetOpaqueblock copy-pasted in both the floating and non-floating branches — hoisted to a shared prefixpaintTitleBar()calledtitleBarColor()four times per frame — computed once into a localmatchInactiveTitleBarcheckbox was at row 10 with rows 8–9 unused — corrected to row 8