UI: Fix source tree item color height
Description
This fixes an issue where the source tree item's widget wouldn't expand to the size of the parent list item.
Due to some QT wonkiness, the widget inside the list item cannot be resized, that's why padding only works on the item not the widget inside. So we have to set a fixed height of list items, and then the widget inside resizes properly,
This affected all themes that used padding with the list items.
Before:

After:

Motivation and Context
Fix theme bugs
How Has This Been Tested?
Set scene item colors and made sure everything looked good.
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch.
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [x] I have included updates to all appropriate documentation.
As we're partially breaking existing themes as part of 28 anyway, what if we just restructure this widget so that hacks like this aren't necessary any more? We've had to fight this particular element in various ways for ages.
We can't restructure the widget, as it is a QT problem that it works this way, afaik.
According to a bunch of forum posts, the only way to fix this without changing the qss would to create a style delegate and override the paint event in the source tree, which I don't feel like doing. Just some dumb QT things.
Ah, that's a bummer. Thanks for looking into it.
The margins should be set in the .qss, not in the code. Example, 3px from all sides:
SourceTree {
margin: 3px;
}
At some point, you should decide either you using .qss or customizing the whole UI manually, in the code.
The padding works OK. Probably, you misunderstanding the box model of the widget. It is not known what the theme should look like (the author should say if the selection border wasn't intentional).
Also, please fix the "group"ed sign width (obviously, it is cut in Yami theme): At least, like this:
SourceTreeSubItemCheckBox {
...
min-width: 12px;
}
Also, the string: https://github.com/obsproject/obs-studio/blob/61e0d69779882fdbca2f38856237c7cd0bc4ca86/UI/data/themes/Yami.qss#L184 do nothing. It is seems to be leftover from the attempt to round the background color from the Set Color, isn't?
If so, then the:
*[bgColor="1"]
{
border-radius: 4px;
}
may help (should be set for all 8 colors)
If not - the string can be removed (only Acri theme uses border here, and the style isn't preserved on theme change, for me at least).
Fixed merge conflicts and restored the padding in the scene tree.
Can source rows not lose their rounded corners?
Apparently the hardcoded heights do not scale on DPI changes.
@GeorgesStavracas could you post a screenshot of what they look like under high dpi?
I finally figured out a way of doing this without hardcoding the heights.
@GeorgesStavracas could you confirm it works with different dpis?
Fixed merge conflicts.
Here's how this PR currently looks on my laptop screen, which uses a 125% custom scaling factor.

Thanks @RytoEX, this looks good to me now - I wonder if the QSS changes here affect the menu style though, @cg2121 could you confirm menus still have the same style as of lists?
@GeorgesStavracas the menu is styled correctly.

What was the purpose of this change after an approval was given? It looks like some stylistic preference rather than a functional change, so it _shouldn't affect anything, unless there's some importance to the order of identifiers here. At minimum, please point out that you pushed a change and what it was for so we don't miss the fact that a change was pushed after approval, so that we can ascertain if we need to retest or re-review.
https://github.com/obsproject/obs-studio/compare/2ae773a39ecf328c1db79f873450e81aeec7a430..76e8c3da14468c480afcfd9326b9bf85642183ef
It was because of a bad rebase, as I didn't realize a line was removed.
It was because of a bad rebase, as I didn't realize a line was removed.
Ah, I see. Some lines were reordering, some were adding in the accidentally removed lines.