| 139 | } |
| 140 | |
| 141 | void YACReaderSideBar::applyTheme(const Theme &theme) |
| 142 | { |
| 143 | splitter->setStyleSheet(theme.sidebar.splitterQSS); |
| 144 | |
| 145 | // Titles are per-instance, toolbars handle their own colors via Themable |
| 146 | auto applyCase = [&](const QString &s) { return theme.sidebar.uppercaseLabels ? s.toUpper() : s; }; |
| 147 | librariesTitle->setTitle(applyCase(QObject::tr("Libraries"))); |
| 148 | foldersTitle->setTitle(applyCase(QObject::tr("Folders"))); |
| 149 | readingListsTitle->setTitle(applyCase(QObject::tr("Reading Lists"))); |
| 150 | |
| 151 | for (auto separator : separators) { |
| 152 | separator->setColor(theme.sidebar.sectionSeparatorColor); |
| 153 | } |
| 154 | |
| 155 | update(); // Trigger repaint for background color |
| 156 | } |
| 157 | |
| 158 | YACReaderSideBarSeparator::YACReaderSideBarSeparator(QWidget *parent) |
| 159 | : QWidget(parent), separatorColor(QColor("#575757")) |