0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 08:41:02 +08:00

#0 [Gui] Windows styling fix

This commit is contained in:
Victor Zarubkin 2018-03-03 03:01:41 +03:00
parent f6447ad3f9
commit 49f000d11a
3 changed files with 13 additions and 6 deletions

View File

@ -2308,14 +2308,14 @@ void ThreadNamesWidget::onTreeChange()
auto vbar = verticalScrollBar(); auto vbar = verticalScrollBar();
auto viewBar = m_view->verticalScrollBar(); auto viewBar = m_view->verticalScrollBar();
auto r = m_view->sceneRect();
setSceneRect(0, r.top(), maxLength, r.height() + m_additionalHeight);
setVerticalScrollbarRange(viewBar->minimum(), viewBar->maximum()); setVerticalScrollbarRange(viewBar->minimum(), viewBar->maximum());
vbar->setSingleStep(viewBar->singleStep()); vbar->setSingleStep(viewBar->singleStep());
vbar->setPageStep(viewBar->pageStep()); vbar->setPageStep(viewBar->pageStep());
vbar->setValue(viewBar->value()); vbar->setValue(viewBar->value());
auto r = m_view->sceneRect();
setSceneRect(0, r.top(), maxLength, r.height() + m_additionalHeight);
auto item = new ThreadNameItem(); auto item = new ThreadNameItem();
item->setPos(0, 0); item->setPos(0, 0);
item->setBoundingRect(sceneRect()); item->setBoundingRect(sceneRect());
@ -2568,8 +2568,15 @@ void ThreadNamesWidget::wheelEvent(QWheelEvent* _event)
if (vbar != nullptr) if (vbar != nullptr)
{ {
_event->accept(); _event->accept();
const auto prev = vbar->value();
vbar->setValue(vbar->value() - _event->delta()); vbar->setValue(vbar->value() - _event->delta());
if (prev != vbar->value())
{
verticalScrollBar()->setValue(vbar->value()); verticalScrollBar()->setValue(vbar->value());
repaintScene();
}
} }
} }

View File

@ -148,7 +148,7 @@ QTreeView::branch {
border-bottom: 1px solid #cccccc; } border-bottom: 1px solid #cccccc; }
QTreeView::branch:selected { QTreeView::branch:selected {
background-color: transparent; } background-color: rgba(152, 222, 152, 0.8); }
QTreeView::branch:open:has-children { QTreeView::branch:open:has-children {
padding: 9px 0 9px 0; padding: 9px 0 9px 0;

View File

@ -166,7 +166,7 @@ QTreeView::branch {
} }
QTreeView::branch:selected { QTreeView::branch:selected {
background-color: transparent; background-color: rgb_a(#98DE98, 0.8);
} }
QTreeView::branch:open:has-children { QTreeView::branch:open:has-children {