Files
yacreader/YACReader/themes/theme.h
luisangelsm 6b3fcc63d3 Make help/about dialog themable
Just the hardcoded colors used, the rest of the dialog will be themed by Qt.
2026-02-19 18:06:31 +01:00

137 lines
4.3 KiB
C

#ifndef THEME_H
#define THEME_H
#include <QtGui>
#include "help_about_dialog_theme.h"
struct ToolbarThemeTemplates {
QString toolbarQSS = "QToolBar { border: none; background: %1; }\n"
"QToolBar::separator { background: %2; width: 1px; margin: 5px 4px; }\n"
"QToolButton:checked { background-color: %3; }\n"
"QToolButton::menu-button {border: none; width: 18px; }\n"
"QToolButton::menu-arrow { image: url(%4); width: 8px; height: 8px; }\n";
QString menuArrowPath = ":/images/viewer_toolbar/menuArrow.svg";
};
struct ViewerThemeTemplates {
QString infoLabelQSS = "QLabel { color : %1; font-size:%2px; }";
};
struct GoToFlowWidgetThemeTemplates {
QString sliderQSS = "QSlider::groove:horizontal {"
" border: 1px solid %1;"
" border-radius: 1px;"
" background: %2;"
" margin: 2px 0;"
" padding: 1px;"
"}"
"QSlider::handle:horizontal {"
" background: %3;"
" width: 48px;"
" border-radius: 1px;"
"}";
QString editQSS = "QLineEdit {border: 1px solid %1; background: %2; color: %3; padding: 3px 5px 5px 5px; margin: 13px 5px 12px 5px; font-weight:bold}";
QString buttonQSS = "QPushButton { border: none; padding: 0px; } "
"QPushButton:focus { border: none; outline: none; } "
"QPushButton:pressed { padding-top: 1px; padding-left: 1px; padding-bottom: -1px; padding-right: -1px; }";
QString labelQSS = "QLabel { color: %1; }";
};
struct ToolbarTheme {
QString toolbarQSS;
QIcon openAction;
QIcon openAction18x18;
QIcon openFolderAction;
QIcon openFolderAction18x18;
QIcon openLatestComicAction;
QIcon openLatestComicAction18x18;
QIcon saveImageAction;
QIcon saveImageAction18x18;
QIcon openComicOnTheLeftAction;
QIcon openComicOnTheLeftAction18x18;
QIcon openComicOnTheRightAction;
QIcon openComicOnTheRightAction18x18;
QIcon goToPageOnTheLeftAction;
QIcon goToPageOnTheLeftAction18x18;
QIcon goToPageOnTheRightAction;
QIcon goToPageOnTheRightAction18x18;
QIcon adjustHeightAction;
QIcon adjustHeightAction18x18;
QIcon adjustWidthAction;
QIcon adjustWidthAction18x18;
QIcon leftRotationAction;
QIcon leftRotationAction18x18;
QIcon rightRotationAction;
QIcon rightRotationAction18x18;
QIcon doublePageAction;
QIcon doublePageAction18x18;
QIcon doubleMangaPageAction;
QIcon doubleMangaPageAction18x18;
QIcon increasePageZoomAction;
QIcon increasePageZoomAction18x18;
QIcon decreasePageZoomAction;
QIcon decreasePageZoomAction18x18;
QIcon resetZoomAction;
QIcon resetZoomAction18x18;
QIcon showZoomSliderlAction;
QIcon showZoomSliderlAction18x18;
QIcon goToPageAction;
QIcon goToPageAction18x18;
QIcon optionsAction;
QIcon optionsAction18x18;
QIcon helpAboutAction;
QIcon helpAboutAction18x18;
QIcon showMagnifyingGlassAction;
QIcon showMagnifyingGlassAction18x18;
QIcon setBookmarkAction;
QIcon setBookmarkAction18x18;
QIcon showBookmarksAction;
QIcon showBookmarksAction18x18;
QIcon showShorcutsAction;
QIcon showShorcutsAction18x18;
QIcon showInfoAction;
QIcon showInfoAction18x18;
QIcon closeAction;
QIcon closeAction18x18;
QIcon showDictionaryAction;
QIcon showDictionaryAction18x18;
QIcon adjustToFullSizeAction;
QIcon adjustToFullSizeAction18x18;
QIcon fitToPageAction;
QIcon fitToPageAction18x18;
QIcon showFlowAction;
QIcon showFlowAction18x18;
};
struct ViewerTheme {
QColor defaultBackgroundColor;
QColor defaultTextColor;
QColor infoBackgroundColor;
QString infoLabelQSS;
};
struct GoToFlowWidgetTheme {
QColor flowBackgroundColor;
QColor flowTextColor;
QColor toolbarBackgroundColor;
QString sliderQSS;
QString editQSS;
QString buttonQSS;
QString labelQSS;
QIcon centerIcon;
QIcon goToIcon;
};
struct Theme {
ToolbarTheme toolbar;
ViewerTheme viewer;
GoToFlowWidgetTheme goToFlowWidget;
HelpAboutDialogTheme helpAboutDialog;
};
#endif // THEME_H