fix wallpaper refresh and editinit error
This commit is contained in:
parent
08f1a0019e
commit
755b090fde
|
@ -119,10 +119,11 @@ void GlobalImageWidget::updateWidgetBackgroundColor(const QColor& color)
|
|||
*
|
||||
* 根据传入的封面文件路径更新壁纸文件路径。
|
||||
*
|
||||
* @param coverFilePath 封面文件路径
|
||||
* @param WallpaperFilePath 壁纸文件路径
|
||||
*/
|
||||
void GlobalImageWidget::updateWallpaper(const QString &WallpaperFilePath)
|
||||
{
|
||||
m_image = QPixmap();
|
||||
m_image = QPixmap(WallpaperFilePath);
|
||||
m_image = m_image.scaled(1920, 1080, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
if (m_image.isNull()) {
|
||||
|
|
|
@ -49,7 +49,7 @@ void GlobalThemeWidget::eidtInitWidget(const HistoryInfo &InfoData)
|
|||
this->setTransparency(m_info.transparency);
|
||||
this->setWindowRadius(m_info.windowradius);
|
||||
|
||||
// m_preview->updateWallpaper(m_info.wallpaperpath);
|
||||
m_preview->updateWallpaper(m_info.wallpaperpath);
|
||||
// this->update();
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ void GlobalThemeWidget::refresh()
|
|||
this->setTransparency(65);
|
||||
this->setCover(":/resource/background/background-glazing.png");
|
||||
this->setWallpaper(":/resource/background/background-light.png");
|
||||
// m_preview->updateWallpaper(":/resource/background/background-light.png");
|
||||
m_preview->updateWallpaper(":/resource/background/background-light.png");
|
||||
m_preview->updatescale1();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue