mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 19:15:14 -04:00
Draw scrollbar properly when count is 0, should fix #194.
This commit is contained in:
parent
37273895dc
commit
e95f85e961
@ -58,6 +58,8 @@ namespace Launcher {
|
||||
}
|
||||
|
||||
void GetScrollbarCoords( out int y, out int height ) {
|
||||
if( Count == 0 ) { y = 0; height = 0; return; }
|
||||
|
||||
float scale = Height / (float)Count;
|
||||
y = (int)Math.Ceiling( CurrentIndex * scale );
|
||||
height = (int)Math.Ceiling( (maxIndex - CurrentIndex) * scale );
|
||||
|
Loading…
x
Reference in New Issue
Block a user