Commit f96ba99b authored by Harald Sitter's avatar Harald Sitter 🎶

fix readjustment logic

since forever ago logo.text was NULL, turning a crucial part of the offset
calculation noop.

to preserve the intention of the code we adjust the offset Y such that it
is *always* slightly below the spinner. this should prevent the label
text from ever overlapping with the progress indication.

(this is only applied to master at the time of writing as there is no
 known bug report of the offset being wrong, so conservatively this only
 gets changed in master at the off chance of it having unintended side
 effects)
parent ae82ce13
......@@ -252,8 +252,12 @@ fun TextYOffset() {
y = y + ((min_height - y - text_height) /2);
}
if (y < logo.text.GetY() + logo.text.height + first_line_height/2) {
y = logo.text.GetY() + logo.text.height + first_line_height/2;
// This basically undoes whatever went on above, to a degree...
// If the y would overlap with the Spinner (bottom most element of the
// static cruft) we move it further down so that at least half a line of
// space is between the spinner and our y.
if (y < spin.GetY() + spin.GetHeight() + first_line_height / 2) {
y = spin.GetY() + spin.GetHeight() + first_line_height / 2;
}
return y;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment