author | sandman <sandman> | 2002-07-06 19:16:43 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-07-06 19:16:43 (UTC) |
commit | 2fa52f80f59249c3f838fa6fdbc2a890e4d96334 (patch) (unidiff) | |
tree | 676cd870c02fad226755f0d6ddb95ed6147bfa4a | |
parent | 3a422983abc7342c9229dccac825d0608fca10f3 (diff) | |
download | opie-2fa52f80f59249c3f838fa6fdbc2a890e4d96334.zip opie-2fa52f80f59249c3f838fa6fdbc2a890e4d96334.tar.gz opie-2fa52f80f59249c3f838fa6fdbc2a890e4d96334.tar.bz2 |
Use only two (instead of three) button controls on scrollbars due to space
constraints) -- will be configureable somtime ...
-rw-r--r-- | noncore/styles/liquid/liquid.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp index acf0a42..67e53e9 100644 --- a/noncore/styles/liquid/liquid.cpp +++ b/noncore/styles/liquid/liquid.cpp | |||
@@ -1520,7 +1520,7 @@ void LiquidStyle::drawScrollBarControls(QPainter *p, const QScrollBar *sb, | |||
1520 | if(sbBuffer.size() != sb->size()) | 1520 | if(sbBuffer.size() != sb->size()) |
1521 | sbBuffer.resize(sb->size()); | 1521 | sbBuffer.resize(sb->size()); |
1522 | } | 1522 | } |
1523 | subB.setRect( subX,subY,buttonDim,buttonDim ); | 1523 | subB.setRect( subX,subY,0,0); // buttonDim,buttonDim ); |
1524 | addB.setRect( addX,addY,buttonDim,buttonDim ); | 1524 | addB.setRect( addX,addY,buttonDim,buttonDim ); |
1525 | if(horiz) | 1525 | if(horiz) |
1526 | subHC.setRect(addX-buttonDim,addY,buttonDim,buttonDim ); | 1526 | subHC.setRect(addX-buttonDim,addY,buttonDim,buttonDim ); |
@@ -1548,7 +1548,7 @@ void LiquidStyle::drawScrollBarControls(QPainter *p, const QScrollBar *sb, | |||
1548 | QPainter painter; | 1548 | QPainter painter; |
1549 | if(!horiz){ | 1549 | if(!horiz){ |
1550 | painter.begin(&sbBuffer); | 1550 | painter.begin(&sbBuffer); |
1551 | QRect bgR(0, subB.bottom()+1, sb->width(), (len-(buttonDim*3))+1); | 1551 | QRect bgR(0, subB.bottom()+1, sb->width(), (len-(buttonDim*2))+1); |
1552 | if(sliderR.height() >= 8){ | 1552 | if(sliderR.height() >= 8){ |
1553 | painter.drawPixmap(bgR.x()+1, bgR.y(), *vsbSliderFillPix, 0, 0, | 1553 | painter.drawPixmap(bgR.x()+1, bgR.y(), *vsbSliderFillPix, 0, 0, |
1554 | 13, 8); | 1554 | 13, 8); |
@@ -1614,7 +1614,7 @@ void LiquidStyle::drawScrollBarControls(QPainter *p, const QScrollBar *sb, | |||
1614 | } | 1614 | } |
1615 | else{ | 1615 | else{ |
1616 | painter.begin(&sbBuffer); | 1616 | painter.begin(&sbBuffer); |
1617 | QRect bgR(subB.right()+1, 0, (len-(buttonDim*3))+1, sb->height()); | 1617 | QRect bgR(subB.right()+1, 0, (len-(buttonDim*2))+1, sb->height()); |
1618 | if(sliderR.width() >= 8){ | 1618 | if(sliderR.width() >= 8){ |
1619 | painter.drawPixmap(bgR.x(), bgR.y()+1, *vsbSliderFillPix, 0, 0, | 1619 | painter.drawPixmap(bgR.x(), bgR.y()+1, *vsbSliderFillPix, 0, 0, |
1620 | 8, 13); | 1620 | 8, 13); |
@@ -1685,10 +1685,10 @@ void LiquidStyle::drawScrollBarControls(QPainter *p, const QScrollBar *sb, | |||
1685 | addB.width()-8, addB.height()-8, g, !maxed); | 1685 | addB.width()-8, addB.height()-8, g, !maxed); |
1686 | } | 1686 | } |
1687 | if ( controls & SubLine ) { | 1687 | if ( controls & SubLine ) { |
1688 | drawSBButton(p, subB, g, activeControl == SubLine); | 1688 | // drawSBButton(p, subB, g, activeControl == SubLine); |
1689 | drawArrow( p, horiz ? LeftArrow : UpArrow, | 1689 | // drawArrow( p, horiz ? LeftArrow : UpArrow, |
1690 | false, subB.x()+4, subB.y()+4, | 1690 | // false, subB.x()+4, subB.y()+4, |
1691 | subB.width()-8, subB.height()-8, g, !maxed); | 1691 | // subB.width()-8, subB.height()-8, g, !maxed); |
1692 | drawSBButton(p, subHC, g, activeControl == SubLine); | 1692 | drawSBButton(p, subHC, g, activeControl == SubLine); |
1693 | drawArrow( p, horiz ? LeftArrow : UpArrow, | 1693 | drawArrow( p, horiz ? LeftArrow : UpArrow, |
1694 | false, subHC.x()+4, subHC.y()+4, | 1694 | false, subHC.x()+4, subHC.y()+4, |
@@ -1789,8 +1789,8 @@ void LiquidStyle::scrollBarMetrics(const QScrollBar *sb, int &sliderMin, | |||
1789 | else | 1789 | else |
1790 | buttonDim = ( length - b*2 )/2 - 1; | 1790 | buttonDim = ( length - b*2 )/2 - 1; |
1791 | 1791 | ||
1792 | sliderMin = b + buttonDim; | 1792 | sliderMin = b + 0; // buttonDim; |
1793 | maxLength = length - b*2 - buttonDim*3; | 1793 | maxLength = length - b*2 - buttonDim*2; // 3; |
1794 | 1794 | ||
1795 | if ( sb->maxValue() == sb->minValue() ) { | 1795 | if ( sb->maxValue() == sb->minValue() ) { |
1796 | sliderLength = maxLength; | 1796 | sliderLength = maxLength; |