mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04: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:
@ -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 ¶ms)
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user