correct scrollbar rendering in comboboxes.

If not enough items list, render shorter scrollbar.
This commit is contained in:
titiger 2019-10-09 01:48:24 +02:00
parent 06b8ab4582
commit bebdb3e753
1 changed files with 0 additions and 3 deletions

View File

@ -3655,7 +3655,6 @@ void Renderer::renderScrollBar(const GraphicScrollBar *sb) {
// calc real length
if(sb->getElementCount()<sb->getVisibleSize()){
int realLength=sb->getElementCount()*sb->getLength()/ sb->getVisibleSize();
printf("y=%d h=%d realH=%d realY=%d\n",y,h,realLength,y+(h-realLength));
if (sb->getHorizontal()) {
x=x-(w-realLength);
}
@ -3664,8 +3663,6 @@ void Renderer::renderScrollBar(const GraphicScrollBar *sb) {
h=realLength;
};
}
printf("y=%d h=%d\n",y,h);
//const Vec3f disabledTextColor= Vec3f(0.25f,0.25f,0.25f);
glPushAttrib(GL_CURRENT_BIT | GL_ENABLE_BIT);
/////////////////////