Have a minimum size for scrollbars
With small font sizes, the scrollbars don't need to get smaller than 14 pixels. So, don't allow the scaling to go below 1.
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
|
||||
#include <ScrollBar.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -993,7 +995,7 @@ BScrollBar::SetBorderHighlighted(bool highlight)
|
||||
void
|
||||
BScrollBar::GetPreferredSize(float* _width, float* _height)
|
||||
{
|
||||
const float scale = be_plain_font->Size() / 12.0f;
|
||||
const float scale = std::max(be_plain_font->Size() / 12.0f, 1.0f);
|
||||
if (fOrientation == B_VERTICAL) {
|
||||
if (_width)
|
||||
*_width = B_V_SCROLL_BAR_WIDTH * scale;
|
||||
|
||||
Reference in New Issue
Block a user