MCPcopy Create free account
hub / github.com/davisking/dlib / get_button_length

Method get_button_length

dlib/gui_widgets/style.cpp:745–761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

743// ----------------------------------------------------------------------------------------
744
745 long scroll_bar_style_default::
746 get_button_length (
747 long total_length,
748 long
749 ) const
750 {
751 // if the length is too small then we have to smash up the arrow buttons
752 // and hide the slider.
753 if (total_length <= get_width()*2)
754 {
755 return total_length/2;
756 }
757 else
758 {
759 return get_width();
760 }
761 }
762
763// ----------------------------------------------------------------------------------------
764

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected