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:
luisangelsm
2026-01-25 10:25:00 +01:00
parent 07718e50db
commit 6b3fcc63d3
8 changed files with 94 additions and 6 deletions

View File

@ -3,6 +3,8 @@
#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"
@ -128,6 +130,7 @@ struct Theme {
ToolbarTheme toolbar;
ViewerTheme viewer;
GoToFlowWidgetTheme goToFlowWidget;
HelpAboutDialogTheme helpAboutDialog;
};
#endif // THEME_H

View File

@ -45,6 +45,7 @@ struct ThemeParams {
ToolbarParams toolbarParams;
ViewerParams viewerParams;
GoToFlowWidgetParams goToFlowWidgetParams;
HelpAboutDialogTheme helpAboutDialogParams;
};
void setToolbarIconPair(QIcon &icon,
@ -152,6 +153,10 @@ Theme makeTheme(const ThemeParams &params)
theme.goToFlowWidget.goToIcon = QIcon(goToIconPath);
// end GoToFlowWidget
// HelpAboutDialog
theme.helpAboutDialog = params.helpAboutDialogParams;
// end HelpAboutDialog
return theme;
}
@ -212,6 +217,9 @@ ThemeParams classicThemeParams()
params.goToFlowWidgetParams = goToFlowWidgetParams;
params.helpAboutDialogParams.headingColor = QColor(0x302f2d);
params.helpAboutDialogParams.linkColor = QColor(0xC19441);
return params;
}
@ -256,6 +264,9 @@ ThemeParams lightThemeParams()
params.goToFlowWidgetParams = goToFlowWidgetParams;
params.helpAboutDialogParams.headingColor = QColor(0x302f2d);
params.helpAboutDialogParams.linkColor = QColor(0xC19441);
return params;
}
@ -300,6 +311,9 @@ ThemeParams darkThemeParams()
params.goToFlowWidgetParams = goToFlowWidgetParams;
params.helpAboutDialogParams.headingColor = QColor(0xE0E0E0);
params.helpAboutDialogParams.linkColor = QColor(0xD4A84B);
return params;
}