Mercurial > minori
comparison src/gui/widgets/sidebar.cpp @ 71:5f9bdcea3d01
sidebar: fix regression caused by SetBackgroundColor()
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Tue, 03 Oct 2023 04:56:18 -0400 |
parents | 27a19dd6cba1 |
children | 5ccb99bfa605 |
comparison
equal
deleted
inserted
replaced
70:64e5f427c6a2 | 71:5f9bdcea3d01 |
---|---|
29 void SideBar::SetCurrentItem(int index) { | 29 void SideBar::SetCurrentItem(int index) { |
30 setCurrentRow(AddSeparatorsToIndex(index)); | 30 setCurrentRow(AddSeparatorsToIndex(index)); |
31 } | 31 } |
32 | 32 |
33 void SideBar::SetBackgroundColor(QColor color) { | 33 void SideBar::SetBackgroundColor(QColor color) { |
34 viewport()->setAutoFillBackground(color != Qt::transparent); | |
34 QPalette pal(palette()); | 35 QPalette pal(palette()); |
35 pal.setColor(QPalette::Window, color); | 36 pal.setColor(QPalette::Window, color); |
36 setPalette(pal); | 37 setPalette(pal); |
37 } | 38 } |
38 | 39 |