MCPcopy Create free account
hub / github.com/YACReader/yacreader / applyTheme

Method applyTheme

custom_widgets/yacreader_sidebar.cpp:141–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void 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
158YACReaderSideBarSeparator::YACReaderSideBarSeparator(QWidget *parent)
159 : QWidget(parent), separatorColor(QColor("#575757"))

Callers

nothing calls this directly

Calls 2

setTitleMethod · 0.45
setColorMethod · 0.45

Tested by

no test coverage detected