Improve and simplify drawing of tabs in TabBarPlus#1075
Improve and simplify drawing of tabs in TabBarPlus#1075Ede123 wants to merge 1 commit intonotepad-plus-plus:masterfrom
Conversation
|
Because I forgot to mention before: |
|
👍 |
|
Excellent! It's much better looking with a constant position using a highlighted tab. I think there is still some wasted space between the save icon/close button and edges, even while inactive. The vertical alignment is greatly improved. I don't think it needs tweaking (except to fix the non highlighted version if possible). |
|
Tabbar height (or width respectively) was not my decision (see 7a25c98). Since it's not subject of this PR let's not digress further - what my patch achieves, though, is that tab height could be adjusted at any point in the future without breaking positioning of elements. Regarding 2px vertical position change of tabs without top bar highlighting: Read my description! It's intentional to be consistent with native Windows UI styling. While I'm not bound to this specific change, I think it's reasonable. Anyway let's wait for a response by @donho and/or @milipili first. I assume they have their own preferences and it does not make sense to fine-tune this PR as long as I don't even know if it will be accepted. |
- All positions are dynamically calculated relative to the tab rectangle now (i.e. no hardcoded pixel values are used to position icons/text anymore) - Match positioning of icons/text in active and inactive tabs (i.e. elements are not "jumping around" anymore upon selection) Some specific fixes: - Most issues with vertical TabBar are resolved now (it was basically unusable before, for example labels were cut) - Darkened background of inactive tabs fills the whole tab now (fixes notepad-plus-plus#1011) - Close button is centered correctly now (fixes notepad-plus-plus#1010)
|
Nice patch! thank you. |
Changes in this PR:
I have some more fixes in line, but I first want to make sure the PR will be accepted like this before putting more work into it.
Some specific fixes:
Here are some screenshot for easy comparison of (old ->new) behavior:
(old)
(new)
When not using the orange top bar for highlighting content of tabs is shifted two pixels to the top when active (standard for Windows tab controls)
