Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply large padding only when image for tab item shall not be shown #945 #947

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

HeikoKlare
Copy link
Contributor

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:
image

After this change (like before #785):
image

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

…clipse-platform#945

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 eclipse-platform#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.

Contributes to
eclipse-platform#945
@HeikoKlare HeikoKlare requested a review from sratz December 19, 2023 12:49
Copy link
Contributor

Test Results

     299 files  ±0       299 suites  ±0   5m 0s ⏱️ -23s
  4 097 tests ±0    4 089 ✔️ ±0    8 💤 ±0  0 ±0 
12 203 runs  ±0  12 130 ✔️ ±0  73 💤 ±0  0 ±0 

Results for commit 258fe3d. ± Comparison against base commit f19db14.

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.

2 participants