Apply large padding only when image for tab item shall not be shown #945 #947
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.
Currently, all headers in CTabFolders without an image have a large text padding. This applies to both the case where no image is assigned to a tab item and the case where images shall not be shown as the properties showSelectedImage and showUnselectedImage are both false. While the latter is intended behavior to switch between image-based tab folders and image-less, padding-based tab folders (see #785), the former unintentionally breaks with the existing UI experience for CTabFolders that do not use images.
This change makes the identification of whether large text padding shall be applied explicit by factoring it out into a method (which may be replaced by a different implementation later on). It reduces the cases in which the large text padding is applied to the intended case (showSelectedImage = showUnselectedImage = false) and restores the behavior for all existing use cases.
Before this change:
After this change (like before #785):
The "before" state can now only be achieved when the tab folder has showSelectedImage=showUnselectedImage=false (which will never be the case for existing CTabFolders as showSelectedImage=true by default).
Contributes to #945