mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 00:31:02 +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 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());
|
||||||
verticalScrollBar()->setValue(vbar->value());
|
|
||||||
|
if (prev != vbar->value())
|
||||||
|
{
|
||||||
|
verticalScrollBar()->setValue(vbar->value());
|
||||||
|
repaintScene();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user