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

Some tabs got invisible on tab bar #351

Closed
wmjordan opened this issue Oct 3, 2023 · 6 comments
Closed

Some tabs got invisible on tab bar #351

wmjordan opened this issue Oct 3, 2023 · 6 comments

Comments

@wmjordan
Copy link
Collaborator

wmjordan commented Oct 3, 2023

I encountered that some tabs were missing on the tab bar. However, if I hovered the mouse cursor onto it, a tooltip would appear.

shot

I had no idea how this happened.
It might be related to a bug about tab scrolling, when tabs overflowed in the bar.

@Wallby
Copy link
Contributor

Wallby commented Nov 21, 2023

For me too in version 2.8.9.3017. Which tabs are shown depends on the size of the unmaximized window, upon maximizing the list of visible tabs doesn't update.

To demonstrate I opened 10 tabs here..
image
image

@Wallby
Copy link
Contributor

Wallby commented Jan 30, 2024

Tried to track down the cause of this and noticed that DrawItem in TabBar.cpp is indeed not called for the selected tab (in my image "New 10") nor for any of the other tabs (in my image "New 8" and "New 9"). Thus I believe that is entirely the cause why they don't show up, but I am not sure what would be the right fix for it.

I created a patch with the changes I tried, which did seem to correctly track the visibility of the updown control called "spin" and also resulted in no tabs being hidden, but caused some artifacts. Not sure if any of what I tried is useful but sharing it anyway.

0001-Tried-to-fix-invisible-tabs-issue-upon-maximizing-wi.patch

@stefankueng
Copy link
Owner

Thanks for the patch!
Change committed.

@Wallby
Copy link
Contributor

Wallby commented Feb 1, 2024

@stefankueng

It is not a perfect fix for this issue as it introduces new issues, specifically if the window is not maximized and the spin control is visible..
image
.. and then you maximize the window and then restore it there is a tab that is displayed incorrectly..
image
.. if you then move one to the right that tab that was displayed incorrectly is displayed correctly again but an artifact stays behind the updown control (right circle around where the artifact is)..
image
.. which also stays if you go to the last tab..
image

Also a small note about the commit adc19be.. this else branch for WM_SHOWWINDOW is not required here as WM_SHOWWINDOW was never sent with wParam == TRUE when I tested.

case WM_SHOWWINDOW:
        {
            if (wParam == FALSE) //< checked and is only ever sent with wParam == FALSE
                pTab->m_bIsSpinVisible = false;
            else
                pTab->m_bIsSpinVisible = true;
            break;
        }

@Wallby
Copy link
Contributor

Wallby commented Feb 1, 2024

Tried to track down the cause of this and noticed that DrawItem in TabBar.cpp is indeed not called for the selected tab (in my image "New 10") nor for any of the other tabs (in my image "New 8" and "New 9"). Thus I believe that is entirely the cause why they don't show up, but I am not sure what would be the right fix for it.

I meant these two DrawItem calls by the way..

DrawItem(&dis, static_cast<float>(Animator::GetValue(m_animVars[GetIDFromIndex(nTab).GetValue()])));

DrawItem(&dis, static_cast<float>(Animator::GetValue(m_animVars[GetIDFromIndex(nSel).GetValue()])));

@Wallby
Copy link
Contributor

Wallby commented Feb 1, 2024

Created a pull request which should fix these artifacts.. #367

stefankueng added a commit that referenced this issue Feb 2, 2024
This should actually fix issue #351
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

No branches or pull requests

3 participants