[GUI] Fix immediate mode transparency and compositing order - #1296
Closed
DimitarCC wants to merge 1 commit into
Closed
[GUI] Fix immediate mode transparency and compositing order#1296DimitarCC wants to merge 1 commit into
DimitarCC wants to merge 1 commit into
Conversation
This commit addresses issues with how transparent, alpha-blended, gradient-blended, and rounded-corner widgets (especially root widgets) are composited in immediate rendering mode. The background and any underlying widgets must be painted *before* overlapping transparent elements to ensure correct blending. Changes include: - Modifying `calcWidgetClipRegion` to ensure areas under transparent widgets remain visible for underlying layers. - Refactoring `paint()` to ensure the desktop background is painted first in immediate mode, and root widgets are iterated back-to-front for painting. - Removing pre-clearing in `paintLayer` to allow blending against existing content. - Adjusting `addRootWidget` to ensure widgets with identical z-positions are consistently stacked with the last-added on top. - Ensuring `eWindow` also sets alpha blend on its child widget for visibility.
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.
This commit addresses issues with how transparent, alpha-blended, gradient-blended, and rounded-corner widgets (especially root widgets) are composited in immediate rendering mode.
The background and any underlying widgets must be painted before overlapping transparent elements to ensure correct blending. Changes include:
calcWidgetClipRegionto ensure areas under transparent widgets remain visible for underlying layers.paint()to ensure the desktop background is painted first in immediate mode, and root widgets are iterated back-to-front for painting.paintLayerto allow blending against existing content.addRootWidgetto ensure widgets with identical z-positions are consistently stacked with the last-added on top.eWindowalso sets alpha blend on its child widget for visibility.