mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-26 08:01:51 +08:00
#0 [Gui] Windows styling fix
This commit is contained in:
parent
f6447ad3f9
commit
49f000d11a
@ -2308,14 +2308,14 @@ void ThreadNamesWidget::onTreeChange()
|
||||
auto vbar = 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());
|
||||
vbar->setSingleStep(viewBar->singleStep());
|
||||
vbar->setPageStep(viewBar->pageStep());
|
||||
vbar->setValue(viewBar->value());
|
||||
|
||||
auto r = m_view->sceneRect();
|
||||
setSceneRect(0, r.top(), maxLength, r.height() + m_additionalHeight);
|
||||
|
||||
auto item = new ThreadNameItem();
|
||||
item->setPos(0, 0);
|
||||
item->setBoundingRect(sceneRect());
|
||||
@ -2568,8 +2568,15 @@ void ThreadNamesWidget::wheelEvent(QWheelEvent* _event)
|
||||
if (vbar != nullptr)
|
||||
{
|
||||
_event->accept();
|
||||
|
||||
const auto prev = vbar->value();
|
||||
vbar->setValue(vbar->value() - _event->delta());
|
||||
verticalScrollBar()->setValue(vbar->value());
|
||||
|
||||
if (prev != vbar->value())
|
||||
{
|
||||
verticalScrollBar()->setValue(vbar->value());
|
||||
repaintScene();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ QTreeView::branch {
|
||||
border-bottom: 1px solid #cccccc; }
|
||||
|
||||
QTreeView::branch:selected {
|
||||
background-color: transparent; }
|
||||
background-color: rgba(152, 222, 152, 0.8); }
|
||||
|
||||
QTreeView::branch:open:has-children {
|
||||
padding: 9px 0 9px 0;
|
||||
|
@ -166,7 +166,7 @@ QTreeView::branch {
|
||||
}
|
||||
|
||||
QTreeView::branch:selected {
|
||||
background-color: transparent;
|
||||
background-color: rgb_a(#98DE98, 0.8);
|
||||
}
|
||||
|
||||
QTreeView::branch:open:has-children {
|
||||
|
Loading…
x
Reference in New Issue
Block a user