mirror of
https://github.com/YACReader/yacreader
synced 2026-03-01 18:33:09 -05:00
Initial implementation of theming
This commit is contained in:
@ -5,3 +5,45 @@ EmptySpecialListWidget::EmptySpecialListWidget(QWidget *parent)
|
||||
{
|
||||
setUpDefaultLayout(true);
|
||||
}
|
||||
|
||||
void EmptySpecialListWidget::showFavorites()
|
||||
{
|
||||
currentType = Favorites;
|
||||
setPixmap(theme.emptyContainer.emptyFavoritesIcon);
|
||||
setText(tr("No favorites"));
|
||||
}
|
||||
|
||||
void EmptySpecialListWidget::showReading()
|
||||
{
|
||||
currentType = Reading;
|
||||
setPixmap(theme.emptyContainer.emptyCurrentReadingsIcon);
|
||||
setText(tr("You are not reading anything yet, come on!!"));
|
||||
}
|
||||
|
||||
void EmptySpecialListWidget::showRecent()
|
||||
{
|
||||
currentType = Recent;
|
||||
setPixmap(QPixmap());
|
||||
setText(tr("There are no recent comics!"));
|
||||
}
|
||||
|
||||
void EmptySpecialListWidget::applyTheme(const Theme &theme)
|
||||
{
|
||||
EmptyContainerInfo::applyTheme(theme);
|
||||
updateIcon();
|
||||
}
|
||||
|
||||
void EmptySpecialListWidget::updateIcon()
|
||||
{
|
||||
switch (currentType) {
|
||||
case Favorites:
|
||||
setPixmap(theme.emptyContainer.emptyFavoritesIcon);
|
||||
break;
|
||||
case Reading:
|
||||
setPixmap(theme.emptyContainer.emptyCurrentReadingsIcon);
|
||||
break;
|
||||
case Recent:
|
||||
case None:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user