forked from openkylin/ukui-menu
#130514,全屏菜单的滑块透明度修改
This commit is contained in:
parent
bd90c1b701
commit
89ad4de047
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue