一点修复

This commit is contained in:
Mike Solar
2023-08-01 09:04:53 +08:00
parent 57aea93735
commit ca35018346
12 changed files with 91 additions and 36 deletions

View File

@ -16,6 +16,7 @@
#else
#pragma comment(lib, "Qt5Svg.lib")
#endif
QString url_param;
NavBar::NavBar(ConfigResponse *configResponse, MainScreen *mainScreen,QWidget *parent) :
QWidget(parent), ui(new Ui::NavBar) {
ui->setupUi(this);
@ -42,6 +43,7 @@ NavBar::NavBar(ConfigResponse *configResponse, MainScreen *mainScreen,QWidget *p
connect(this, &NavBar::firstUrl, mainScreen, &MainScreen::firstUrl);
emit firstUrl(buttonStructs[0].url);
}
}
NavBar::~NavBar() {
@ -81,6 +83,7 @@ void NavBar::resizeEvent(QResizeEvent *event) {
}
void NavBar::getLogoFromInternet(ConfigResponse *configResponse) {
qColor.setNamedColor(configResponse->basic.backgroud_color);
QUrl url_logo(configResponse->basic.logo_url);
QNetworkRequest *request_logo = new QNetworkRequest(url_logo);
manager = new QNetworkAccessManager;
@ -138,6 +141,9 @@ void NavBar::getLogoFromInternet(ConfigResponse *configResponse) {
buttonStruct.image_cover = image_cover;
buttonStruct.text = button.title;
buttonStruct.url = button.url;
buttonStruct.background_color = configResponse->basic.backgroud_color;
buttonStruct.text_color.setNamedColor(configResponse->basic.title_color);
buttonStruct.text_cover_color.setNamedColor(configResponse->basic.title_cover_color);
buttonStructs << buttonStruct;
delete request_image;
delete render_image;