mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-01 03:22:07 +08:00
ui: unify terms scrolling
old-commit-hash: 621824d813f44bf1b1b8ef62645006b81fac2a90
This commit is contained in:
@@ -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()){
|
||||
|
||||
Reference in New Issue
Block a user