Fix opacity not applying to text fragment backgrounds#48
Open
Brayozin wants to merge 2 commits intoSwordfish90:masterfrom
Open
Fix opacity not applying to text fragment backgrounds#48Brayozin wants to merge 2 commits intoSwordfish90:masterfrom
Brayozin wants to merge 2 commits intoSwordfish90:masterfrom
Conversation
Move setOpacity to public slots so it is callable from QML and connectable to signals, add update() so opacity changes repaint immediately, and pass useOpacitySetting=true when drawing text fragment backgrounds so colored backgrounds respect the opacity level
Changed the background drawing logic in drawTextFragment to not use transparency, ensuring consistent rendering of text backgrounds on different applications
2 tasks
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.
Summary
setOpacityfrompublic:topublic slots:so it can becalled from QML and connected to signals
update()tosetOpacityso changing opacity triggers a repaintuseOpacitySetting=trueindrawTextFragmentso text cells withnon-default background colors (e.g. highlighted text, colored output)
also respect the configured opacity level — previously only the default
background was affected
Before and after on my custom terminal widget on quickshell:
BEFORE:
AFTER:
Test plan
setOpacity()and confirm theterminal background renders semi-transparent
ls --color) andconfirm the colored cell backgrounds are also semi-transparent, not
opaque
1.0) rendering is unchanged — novisual difference from before
setOpacityto a QML signal and confirm it fires correctlywithout needing a manual
update()call