X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbcscrollbar.C;h=481bda09ce579042b68db2b3f3c9b455a8699108;hp=680341d0beebf0e990e1b74a5bf42c62670e9473;hb=eb9df615719cf3afe2bc08035900e5d3451034e1;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1 diff --git a/cinelerra-5.1/guicast/bcscrollbar.C b/cinelerra-5.1/guicast/bcscrollbar.C index 680341d0..481bda09 100644 --- a/cinelerra-5.1/guicast/bcscrollbar.C +++ b/cinelerra-5.1/guicast/bcscrollbar.C @@ -86,16 +86,14 @@ void BC_ScrollBar::set_images(VFrame **data) void BC_ScrollBar::calculate_dimensions(int &w, int &h) { - switch(orientation) - { + w = h = pixels; + switch( orientation ) { case SCROLL_HORIZ: - w = pixels; h = data[SCROLL_HANDLE_UP]->get_h(); break; case SCROLL_VERT: w = data[SCROLL_HANDLE_UP]->get_w(); - h = pixels; break; } } @@ -146,7 +144,7 @@ void BC_ScrollBar::draw(int flush) //printf("BC_ScrollBar::draw 1 %d %d\n", selection_status, highlight_status == SCROLL_BACKARROW); // Too small to draw anything - if(get_w() < get_arrow_pixels() * 2 + 5) + if(get_w() < get_arrow_pixels() * 2 + xS(5)) { draw_3segmenth(0, 0, @@ -246,7 +244,7 @@ void BC_ScrollBar::draw(int flush) case SCROLL_VERT: // Too small to draw anything - if(get_h() < get_arrow_pixels() * 2 + 5) + if(get_h() < get_arrow_pixels() * 2 + yS(5)) { draw_3segmentv(0, 0,