presence of bottom horizontal scrollbar will cause timeline instrument names to be misaligned with data rows on arch linux mate

• Jul 13, 2017 - 11:17
Reported version
3.0
Type
Functional
Severity
S4 - Minor
Status
closed
Project

This bissare bug happens in 7bb6f4e only on Linux (both my x86-64 arch linux mate machine and my armv7h arch linux mate machine), but this doesn't happen on windows.

If the timeline window width is large enough to entirely fit the timeline, then there is no bug. But if the timeline window width is too small to entirely fit the timeline, then there will be a horizontal scrollbar at the bottom of the timeline. If I scroll down to the just to the point where the bottom most instrument name is fully within view, then you can see the timeline cell data is aligned properly with the instrument names:

should-be-real-scroll-limits.png

However, if you look carefully at the scrollbar at the right, it indicates that can still scroll further down. If I scroll futher down, then I'm able to scroll up to the point where the bottom of the lowest instrument data row meets the top of the bottom scroll bar. However, you will notice that the instrument names have not scrolled up accordingly, causing the names and data rows to be misaligned:

Screenshot at 2017-07-13 06-03-14.png

It seems that the scrollable region height calculation is somehow taking into account the fact that the bottom scrollbar exists and covers up space. Somehow this calculation is not consistent on all OSes, causing the misalignment.

I'm assigning myself because this is probably something that Joshua can't fix on windows only.


Comments

So, I'm lead to think that this is linked with the PR you submitted. By setting the sceneRect with a height of parent->getHeight(), it ignores the added height required due to the existence of the horizontal scrollbar. I think adding parent->horizontalScrollBar()->height() to parent->getHeight() might just fix this.

Try at https://github.com/musescore/MuseScore/blob/master/mscore/timeline.cpp#…
setSceneRect(0, 0, max_width, parent->getHeight() + parent->horizontalScrollBar()->height());

Status (old) active patch (code needs review)

Joshua, you're right here...previous fix for #232111: Timeline instrument names do not scroll when scroll. Happens on linux, not windows. needed to include the height of the scrollbar. Here is the new fix: https://github.com/musescore/MuseScore/pull/3240

BTW, I'm not sure this is a "linux"-specific issue. It could well be that this is because I'm on arch linux which uses Qt 5.9.1 right now, so it could be that a Qt version changed the behavior.