diff --git a/src/UserInterface/Widget/full_commonuse_widget.cpp b/src/UserInterface/Widget/full_commonuse_widget.cpp index c02f317..26d86b5 100755 --- a/src/UserInterface/Widget/full_commonuse_widget.cpp +++ b/src/UserInterface/Widget/full_commonuse_widget.cpp @@ -119,13 +119,13 @@ void FullCommonUseWidget::initVerticalScrollBar() m_verticalScrollBar->show(); } - m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, 1); " + m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, %4); " "margin: 0px,0px,0px,0px; border-radius: %3px;}" - "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, 1);" + "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, %5);" "border-radius: %3px; min-height: %1;}" "QScrollBar::add-line:vertical{ height: 0px; width: 0px; subcontrol-position: bottom;}" "QScrollBar::sub-line:vertical{ height: 0px; width: 0px; subcontrol-position:top;}").arg(scrollBarSize); - m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2)); + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6)); } void FullCommonUseWidget::on_powerOffButton_clicked() @@ -219,11 +219,15 @@ bool FullCommonUseWidget::eventFilter(QObject *watched, QEvent *event) if (watched == m_verticalScrollBar) { if (event->type() == QEvent::Enter) { - m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4)); + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.78)); } if (event->type() == QEvent::Leave) { - m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2)); + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6)); + } + + if(event->type() == QEvent::MouseButtonPress) { + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.9)); } } diff --git a/src/UserInterface/Widget/full_function_widget.cpp b/src/UserInterface/Widget/full_function_widget.cpp index fd124e4..7cc8464 100755 --- a/src/UserInterface/Widget/full_function_widget.cpp +++ b/src/UserInterface/Widget/full_function_widget.cpp @@ -139,13 +139,13 @@ void FullFunctionWidget::initVerticalScrollBar() m_verticalScrollBar->show(); } - m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, 1); " + m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, %4); " "margin: 0px,0px,0px,0px; border-radius: %3px;}" - "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, 1);" + "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, %5);" "border-radius: %3px; min-height: %1;}" "QScrollBar::add-line:vertical{ height: 0px; width: 0px; subcontrol-position: bottom;}" "QScrollBar::sub-line:vertical{ height: 0px; width: 0px; subcontrol-position:top;}").arg(scrollBarSize); - m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2)); + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6)); } void FullFunctionWidget::on_powerOffButton_clicked() @@ -505,11 +505,15 @@ bool FullFunctionWidget::eventFilter(QObject *watched, QEvent *event) if (watched == m_verticalScrollBar) { if (watched == m_verticalScrollBar) { if (event->type() == QEvent::Enter) { - m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4)); + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.78)); } if (event->type() == QEvent::Leave) { - m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2)); + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6)); + } + + if(event->type() == QEvent::MouseButtonPress) { + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.9)); } } } else { diff --git a/src/UserInterface/Widget/full_letter_widget.cpp b/src/UserInterface/Widget/full_letter_widget.cpp index 45fb165..4b31a32 100755 --- a/src/UserInterface/Widget/full_letter_widget.cpp +++ b/src/UserInterface/Widget/full_letter_widget.cpp @@ -133,13 +133,13 @@ void FullLetterWidget::initVerticalScrollBar() m_verticalScrollBar->show(); } - m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, 1); " + m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, %4); " "margin: 0px,0px,0px,0px; border-radius: %3px;}" - "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, 1);" + "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, %5);" "border-radius: %3px; min-height: %1;}" "QScrollBar::add-line:vertical{ height: 0px; width: 0px; subcontrol-position: bottom;}" "QScrollBar::sub-line:vertical{ height: 0px; width: 0px; subcontrol-position:top;}").arg(scrollBarSize); - m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2)); + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6)); } void FullLetterWidget::on_powerOffButton_clicked() @@ -531,11 +531,15 @@ bool FullLetterWidget::eventFilter(QObject *watched, QEvent *event) { if (watched == m_verticalScrollBar) { if (event->type() == QEvent::Enter) { - m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4)); + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.78)); } if (event->type() == QEvent::Leave) { - m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2)); + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6)); + } + + if(event->type() == QEvent::MouseButtonPress) { + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.9)); } } else { if (event->type() == QEvent::KeyPress) { diff --git a/src/UserInterface/Widget/full_searchresult_widget.cpp b/src/UserInterface/Widget/full_searchresult_widget.cpp index be5dd6b..efdee49 100755 --- a/src/UserInterface/Widget/full_searchresult_widget.cpp +++ b/src/UserInterface/Widget/full_searchresult_widget.cpp @@ -108,13 +108,13 @@ void FullSearchResultWidget::initVerticalScrollBar() m_verticalScrollBar->show(); } - m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, 1); " + m_scrollBarStyle = QString("QScrollBar:vertical{width: %2px; background: rgba(12, 12, 12, %4); " "margin: 0px,0px,0px,0px; border-radius: %3px;}" - "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, 1);" + "QScrollBar::handle:vertical{width: %2px; background: rgba(255, 255, 255, %5);" "border-radius: %3px; min-height: %1;}" "QScrollBar::add-line:vertical{ height: 0px; width: 0px; subcontrol-position: bottom;}" "QScrollBar::sub-line:vertical{ height: 0px; width: 0px; subcontrol-position:top;}").arg(scrollBarSize); - m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2)); + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6)); } void FullSearchResultWidget::on_powerOffButton_clicked() @@ -204,11 +204,15 @@ bool FullSearchResultWidget::eventFilter(QObject *watched, QEvent *event) if (watched == m_verticalScrollBar) { if (event->type() == QEvent::Enter) { - m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4)); + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.78)); } if (event->type() == QEvent::Leave) { - m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2)); + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(4).arg(2).arg(0.25).arg(0.6)); + } + + if(event->type() == QEvent::MouseButtonPress) { + m_verticalScrollBar->setStyleSheet(m_scrollBarStyle.arg(8).arg(4).arg(0.25).arg(0.9)); } }