Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: [0.9.5 bug] positioning and drawing bugs in Scratchbox (Read 5997 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[0.9.5 bug] positioning and drawing bugs in Scratchbox

1. Loading a theme into Scratchbox with fixed width/heigt may cause some gaps in the layout that is filled with whatever is drawn underneath the scratchbox window. Resizing the Scratchbox re-arranges the UI elements and the gap goes away and the UI element is positioned were it should be (in this the playlist at the right edge):

after importing:   after resizing (layout is fixed):

In my example layout the first splitter is left/right with the right pane being fixed.
The left pane of this splitter only has the Facets element, the right side contains another splitter top/bottom with the top being fixed. The bottom pane has a toolbar and playlist tabs and a playlist only. The top has three Tabs and in the first Tab a splitter left right with only the ride pane being fixed... if the bug isn't reproducable, here's my foobar theme:

http://www.hydrogenaudio.org/forums/index....showtopic=58372 (makes use of Facets, but not needed to reproduce the bug)

2. A similar bug appears when adding the UI element "Toolbar header", the blank toolbar isn't filled/redrawn correctly with a blank grey background, moving the Scratchbox beyond the border of the screen (example) causes ugly redrawing issues:


[0.9.5 bug] positioning and drawing bugs in Scratchbox

Reply #1
2. A similar bug appears when adding the UI element "Toolbar header", the blank toolbar isn't filled/redrawn correctly with a blank grey background, moving the Scratchbox beyond the border of the screen (example) causes ugly redrawing issues:

Reproduced on Windows XP. Only happens with Windows themes disabled.

[0.9.5 bug] positioning and drawing bugs in Scratchbox

Reply #2
So you can't reproduce 1. with my theme? You know you have to either use a virgin scratchbox for this to work, because my theme is bigger than the initial size of the scratchbox.

You can't miss this gap in the lower right corner in my example theme...

The issues are that a) it mustn't be there, and the fact that it goes away (i.e. playlist is reset to the right edge) when resizing the scratchbox, tells me it really musn't be there initially. b) it is filled with whatever's in the background, which also tells me it can't be right.

Actually I found two glitches now.

First one: Scratchbox does not resize itself to match the full fixed size of a R/L splitter pane.

When there's a top-level right/left splitter with one pane having a fixed width that is wider than the original scratchbox window's width, then when importing such a theme, this scratchbox window is not automatically extended to at least show that one fixed pane in its entirety. This width check is only done when the mouse cursor activates the window resize when the user left-clicks on the top or bottom window border.

Now the second (my original) bug is similar but may not be related: Toolbar Header elements exported widths cause a Playlist View underneath to not be fully extended to the right edge of the UI element, which itself must be in a splitter pane with a fixed width, upon loading it in a "virgin" scratchbox, all leading to an ugly gap with a redrawing issue. Complicated, yes.

This is what causes the gap with the redrawing issue, shown in my first two screenshot.

So what does actually cause the gap? Well the playlist in the lower right corner is a Toolbar header(Playlist Tab(Playlist View))). For some reason that's causing the playlist view to not stretch to the right edge when the scratchbox fails to resize on loading that theme. It's the Toolbar Header that opens this gap and it only does so when there are elements in the toolbar. I guess the exported width of the buttons and sliders and so on in the Toolbar header blocks the playlist view underneath to get stretched to its full extent upto the right edge when it is in a pane with a fixed width.

So so make it simpler:
1. There's a splitter R/L
2. right pane has fixed width, bigger than the width of the scratchbox it is aboout to be loaded into
3. right pane contains a Toolbar Header with Toolbar elements which must also span the whole width of the UI element
4. the "victim" is a Playlist View underneath the Toolbar Header

The gap does not happen when these conditions are not met (there may be more):

1. the "oversized" theme is loaded into a "virgin" scratchbox. An already resized/fixed (see first bug) scratchbox does not show this glitch.
2. the Toolbar Header contains elements that span across its whole width.
3. the UI element the Toolbar Header and the Playlist View are in the (right?) pane of a R/L splitter set to a fixed width. A width that is wider than the original "virgin" scratchbox.

Possibly the simplest solution to both problems: the check whether the scratchbox is wide enough for all UI elements of fixed sizes must be done during importing, not only after the user has tried to change the height of the scratchbox window.

Although second issue with the gap hints at another missing size check regarding UI elements underneath a Toolbar Header, I guess for efficiency reasons the top-most width/height check that is applied to the main scratchbox window is sufficient for all UI elements.

[0.9.5 bug] positioning and drawing bugs in Scratchbox

Reply #3
Bug #1 still there in beta2.

[0.9.5 bug] positioning and drawing bugs in Scratchbox

Reply #4
Fixed for beta3, thanks for the detailed report.
Microsoft Windows: We can't script here, this is bat country.