Mercurial > minori
diff src/gui/widgets/sidebar.cpp @ 69:27a19dd6cba1
*: fix up some stuff
settings: due to my own incompetence OnOK caused the entire program to crash,
now that's fixed :)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Tue, 03 Oct 2023 03:38:25 -0400 |
parents | 2417121d894e |
children | 5f9bdcea3d01 |
line wrap: on
line diff
--- a/src/gui/widgets/sidebar.cpp Mon Oct 02 21:33:25 2023 -0400 +++ b/src/gui/widgets/sidebar.cpp Tue Oct 03 03:38:25 2023 -0400 @@ -15,7 +15,8 @@ setMouseTracking(true); /* FIXME: is there an easy way to do this with palettes? */ setStyleSheet("QListWidget::item:disabled { background: transparent }"); - viewport()->setAutoFillBackground(false); + + SetBackgroundColor(Qt::transparent); QFont font; font.setPointSize(9); @@ -29,6 +30,12 @@ setCurrentRow(AddSeparatorsToIndex(index)); } +void SideBar::SetBackgroundColor(QColor color) { + QPalette pal(palette()); + pal.setColor(QPalette::Window, color); + setPalette(pal); +} + QListWidgetItem* SideBar::AddItem(QString name, QIcon icon) { QListWidgetItem* item = new QListWidgetItem(this); item->setText(name);