| 82 | } |
| 83 | |
| 84 | bool ScrolledWindow::IsHorizontalScrollbarVisible() const { |
| 85 | if( m_policy & HORIZONTAL_ALWAYS ) { |
| 86 | return true; |
| 87 | } |
| 88 | |
| 89 | if( m_policy & HORIZONTAL_NEVER ) { |
| 90 | return false; |
| 91 | } |
| 92 | |
| 93 | // If we get here Scrollbar is set to Automatic |
| 94 | |
| 95 | auto adjustment = m_horizontal_scrollbar->GetAdjustment(); |
| 96 | auto value_range = adjustment->GetUpper() - adjustment->GetLower() - adjustment->GetPageSize(); |
| 97 | |
| 98 | if( value_range <= .0f ) { |
| 99 | // Nothing to scroll |
| 100 | return false; |
| 101 | } |
| 102 | |
| 103 | return true; |
| 104 | } |
| 105 | |
| 106 | bool ScrolledWindow::IsVerticalScrollbarVisible() const { |
| 107 | if( m_policy & VERTICAL_ALWAYS ) { |
nothing calls this directly
no test coverage detected