Changeset View
Changeset View
Standalone View
Standalone View
src/view/kateviewhelpers.cpp
Context not available. | |||||
734 | m_grooveHeight = grooveRect.height(); | 734 | m_grooveHeight = grooveRect.height(); | ||
---|---|---|---|---|---|
735 | 735 | | |||
736 | const int docXMargin = 1; | 736 | const int docXMargin = 1; | ||
737 | QRect sliderRect = style()->subControlRect(QStyle::CC_ScrollBar, &opt, QStyle::SC_ScrollBarSlider, this); | | |||
738 | sliderRect.adjust(docXMargin, 0, 0, 0); | | |||
739 | | ||||
740 | //style()->drawControl(QStyle::CE_ScrollBarAddLine, &opt, &painter, this); | 737 | //style()->drawControl(QStyle::CE_ScrollBarAddLine, &opt, &painter, this); | ||
741 | //style()->drawControl(QStyle::CE_ScrollBarSubLine, &opt, &painter, this); | 738 | //style()->drawControl(QStyle::CE_ScrollBarSubLine, &opt, &painter, this); | ||
742 | 739 | | |||
Context not available. | |||||
787 | painter.drawRect(grooveRect); | 784 | painter.drawRect(grooveRect); | ||
788 | 785 | | |||
789 | // adjust the rectangles | 786 | // adjust the rectangles | ||
787 | QRect sliderRect = style()->subControlRect(QStyle::CC_ScrollBar, &opt, QStyle::SC_ScrollBarSlider, this); | ||||
788 | sliderRect.setX(docXMargin); | ||||
789 | sliderRect.setWidth(width() - docXMargin*2); | ||||
790 | | ||||
790 | if ((docHeight + 2 * docXMargin >= grooveRect.height()) && (sliderRect.height() > visibleRect.height() + 2)) { | 791 | if ((docHeight + 2 * docXMargin >= grooveRect.height()) && (sliderRect.height() > visibleRect.height() + 2)) { | ||
791 | visibleRect.adjust(2, 0, -3, 0); | 792 | visibleRect.adjust(2, 0, -3, 0); | ||
792 | } else { | 793 | } else { | ||
Context not available. |