additional Andrew provided Termux mods +
[goodguy/cinelerra.git] / cinelerra-5.1 / guicast / bcscrollbar.C
index 680341d0beebf0e990e1b74a5bf42c62670e9473..481bda09ce579042b68db2b3f3c9b455a8699108 100644 (file)
@@ -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,