ui: unify terms scrolling

old-commit-hash: 621824d813f44bf1b1b8ef62645006b81fac2a90
This commit is contained in:
Willem Melching
2021-03-24 08:57:22 +01:00
parent fd5ea05d20
commit 079da64cf2
-16
View File
@@ -82,24 +82,8 @@ QWidget* OnboardingWindow::terms_screen() {
// TODO: tune the scrolling
auto sb = terms_text->verticalScrollBar();
#ifdef QCOM2
sb->setStyleSheet(R"(
QScrollBar {
width: 150px;
background: grey;
}
QScrollBar::handle {
background-color: white;
}
QScrollBar::add-line, QScrollBar::sub-line{
width: 0;
height: 0;
}
)");
#else
QScroller::grabGesture(terms_text, QScroller::TouchGesture);
terms_text->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
#endif
QObject::connect(sb, &QScrollBar::valueChanged, [sb, accept_btn]() {
if (sb->value() == sb->maximum()){