comparison src/gui/widgets/sidebar.cc @ 291:9a88e1725fd2

*: refactor lots of stuff I forgot to put this into different commits, oops! anyway, it doesn't really matter *that* much since this is an unfinished hobby project anyway. once it starts getting stable commit history will be more important, but for now it's not that big of a deal
author Paper <paper@paper.us.eu.org>
date Sun, 12 May 2024 16:31:07 -0400
parents 862d0d8619f6
children 99cbc51433e4
comparison
equal deleted inserted replaced
290:9347e2eaf6e5 291:9a88e1725fd2
28 return RemoveSeparatorsFromIndex(currentRow()); 28 return RemoveSeparatorsFromIndex(currentRow());
29 } 29 }
30 30
31 void SideBar::SetBackgroundColor(QColor color) { 31 void SideBar::SetBackgroundColor(QColor color) {
32 viewport()->setAutoFillBackground(color != Qt::transparent); 32 viewport()->setAutoFillBackground(color != Qt::transparent);
33
34 QPalette pal(palette());
35 pal.setColor(QPalette::Window, color);
36 setPalette(pal);
37 } 33 }
38 34
39 QListWidgetItem* SideBar::AddItem(QString name, QIcon icon) { 35 QListWidgetItem* SideBar::AddItem(QString name, QIcon icon) {
40 QListWidgetItem* item = new QListWidgetItem(this); 36 QListWidgetItem* item = new QListWidgetItem(this);
41 item->setText(name); 37 item->setText(name);