Mercurial > minori
comparison src/gui/widgets/sidebar.cc @ 112:80f49f623d30
locale: allow switching locales without restarting
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 06 Nov 2023 13:41:30 -0500 |
parents | 9b2b41f83a5e |
children | 4d461ef7d424 |
comparison
equal
deleted
inserted
replaced
111:fcae8bece0ec | 112:80f49f623d30 |
---|---|
20 [this](int index) { emit CurrentItemChanged(RemoveSeparatorsFromIndex(index)); }); | 20 [this](int index) { emit CurrentItemChanged(RemoveSeparatorsFromIndex(index)); }); |
21 } | 21 } |
22 | 22 |
23 void SideBar::SetCurrentItem(int index) { | 23 void SideBar::SetCurrentItem(int index) { |
24 setCurrentRow(AddSeparatorsToIndex(index)); | 24 setCurrentRow(AddSeparatorsToIndex(index)); |
25 } | |
26 | |
27 int SideBar::GetCurrentItem() { | |
28 return RemoveSeparatorsFromIndex(currentRow()); | |
25 } | 29 } |
26 | 30 |
27 void SideBar::SetBackgroundColor(QColor color) { | 31 void SideBar::SetBackgroundColor(QColor color) { |
28 viewport()->setAutoFillBackground(color != Qt::transparent); | 32 viewport()->setAutoFillBackground(color != Qt::transparent); |
29 QPalette pal(palette()); | 33 QPalette pal(palette()); |