Skip to content

Add BlurTransparentTitleBar and MatchInactiveTitleBar options#342

Open
ItxFilas wants to merge 1 commit into
Bali10050:mainfrom
ItxFilas:feat/titlebar-blur-and-match-inactive
Open

Add BlurTransparentTitleBar and MatchInactiveTitleBar options#342
ItxFilas wants to merge 1 commit into
Bali10050:mainfrom
ItxFilas:feat/titlebar-blur-and-match-inactive

Conversation

@ItxFilas

Copy link
Copy Markdown

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 ToolBarOpacity value from darklyrc (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 KSharedConfig on every paint, so changes to ToolBarOpacity take 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:

  • adding missing dependencies for arch linux #1 Null dereference in Dolphin tab-frame path — widget && guard added before widget->window() in darklystyle.cpp; Qt can call style primitives with widget == nullptr in QML contexts
  • Update Fedora build steps #2 matchInactiveTitleBar killed the focus-change animation — moved after the animation guard so the timer runs a no-op instead of cross-fading between two identical active colors
  • Build on Seperate System #3 Alpha cap was applied even when hideTitleBar was on — hideTitleBar now returns early before the alpha block
  • Add back the Fedora CMake command. #4 hideTitleBar + matchInactive produced wrong blur threshold — same early return fixes this
  • Added installation instructions for distrobox #5 m_titleBarAlpha was stale — replaced with a live KSharedConfig read; KSharedConfig::openConfig uses a shared in-process cache so this is O(1)
  • Drop Fedora 39 #6 Alpha cap only ever lowered alpha — removed the color.alpha() > m_titleBarAlpha guard so semi-transparent themes are correctly raised to match ToolBarOpacity
  • Release tagging #7 Integer rounding mismatch — qRound(opacity * 255.0 / 100) with float division replaces integer truncation
  • Add files via upload #8 updateBlur() had an identical setOpaque block copy-pasted in both the floating and non-floating branches — hoisted to a shared prefix
  • Fedora 40 Build dependencies #9 paintTitleBar() called titleBarColor() four times per frame — computed once into a local
  • packaging a build as an extension? #10 matchInactiveTitleBar checkbox was at row 10 with rows 8–9 unused — corrected to row 8

… 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant