mirror of
https://github.com/YACReader/yacreader
synced 2026-03-01 10:22:58 -05:00
Make help/about dialog themable
Just the hardcoded colors used, the rest of the dialog will be themed by Qt.
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
#include <QtGui>
|
||||
|
||||
#include "yacreader_icon.h"
|
||||
#include "help_about_dialog_theme.h"
|
||||
|
||||
struct ComicVineThemeTemplates {
|
||||
QString defaultLabelQSS = "QLabel {color:%1; font-size:12px;font-family:Arial;}";
|
||||
@ -130,6 +131,7 @@ struct ComicVineTheme {
|
||||
struct Theme {
|
||||
ComicFlowColors comicFlow;
|
||||
ComicVineTheme comicVine;
|
||||
HelpAboutDialogTheme helpAboutDialog;
|
||||
};
|
||||
|
||||
#endif // THEME_H
|
||||
|
||||
@ -54,6 +54,7 @@ struct ThemeParams {
|
||||
|
||||
ComicFlowColors comicFlowColors;
|
||||
ComicVineParams comicVineParams;
|
||||
HelpAboutDialogTheme helpAboutDialogParams;
|
||||
};
|
||||
|
||||
Theme makeTheme(const ThemeParams ¶ms)
|
||||
@ -115,6 +116,10 @@ Theme makeTheme(const ThemeParams ¶ms)
|
||||
theme.comicVine.rowUpIcon = { QIcon(recolor(t.rowUpIcon, cv.rowIconColor)), t.rowIconSize };
|
||||
theme.comicVine.rowDownIcon = { QIcon(recolor(t.rowDownIcon, cv.rowIconColor)), t.rowIconSize };
|
||||
|
||||
// HelpAboutDialog
|
||||
theme.helpAboutDialog = params.helpAboutDialogParams;
|
||||
// end HelpAboutDialog
|
||||
|
||||
return theme;
|
||||
}
|
||||
|
||||
@ -194,6 +199,9 @@ ThemeParams classicThemeParams()
|
||||
params.comicFlowColors = cf;
|
||||
params.comicVineParams = cv;
|
||||
|
||||
params.helpAboutDialogParams.headingColor = QColor(0x302f2d);
|
||||
params.helpAboutDialogParams.linkColor = QColor(0xC19441);
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
@ -255,6 +263,9 @@ ThemeParams lightThemeParams()
|
||||
params.comicFlowColors = cf;
|
||||
params.comicVineParams = cv;
|
||||
|
||||
params.helpAboutDialogParams.headingColor = QColor(0x302f2d);
|
||||
params.helpAboutDialogParams.linkColor = QColor(0xC19441);
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
@ -316,5 +327,8 @@ ThemeParams darkThemeParams()
|
||||
params.comicFlowColors = cf;
|
||||
params.comicVineParams = cv;
|
||||
|
||||
params.helpAboutDialogParams.headingColor = QColor(0xE0E0E0);
|
||||
params.helpAboutDialogParams.linkColor = QColor(0xD4A84B);
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user