Skip to content

fix: 切换主题外观桌面壁纸被替换 - #24

Merged
dengbo11 merged 1 commit into
linuxdeepin:masterfrom
dengbo11:master-gt
May 5, 2023
Merged

dengbo11 merged 1 commit into
linuxdeepin:masterfrom
dengbo11:master-gt

Conversation

@dengbo11

@dengbo11 dengbo11 commented May 5, 2023

Copy link
Copy Markdown
Contributor

当桌面壁纸为用户自定义的壁纸时, 主题应该切换为自定义主题
当用户去修改主题的其它选项(非壁纸)时, 桌面壁纸不随主题变化

Log: 修复切换主题外观桌面壁纸被替换的问题
Resolve: linuxdeepin/developer-center#4198

当桌面壁纸为用户自定义的壁纸时, 主题应该切换为自定义主题
当用户去修改主题的其它选项(非壁纸)时, 桌面壁纸不随主题变化

Log: 修复切换主题外观桌面壁纸被替换的问题
Resolve: linuxdeepin/developer-center#4198
@dengbo11
dengbo11 requested review from Decodetalkers and zsien May 5, 2023 07:35
{
static const QMap<QString, QString> typekeyMap = {
{ TYPEBACKGROUND, "Wallpaper" },
{ TYPEWALLPAPER, "Wallpaper" },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个值为什么要更改呢。

@Decodetalkers Decodetalkers May 5, 2023 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

很多地方使用了这个key.。如果它要丢弃。。那么其他地方是不是也要处理,好吧,clangd给我找到同名的家伙了

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原来的写出错了

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

明白了

@BLumia BLumia left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是在切换壁纸时检查当前壁纸是否为 index.theme 里所给定的壁纸会好一点?这样的话,如果用户主动设置了一个来自系统提供的(位于 /usr/share/wallpapers/deepin 下)但非与当前主题关联的壁纸,用户所选的壁纸也同样不会被因为切亮暗色而被设置走。另外还可以避免硬编码 /usr/share/wallpapers/deepin 这个路径。

cc @wineee

@wineee

wineee commented May 5, 2023

Copy link
Copy Markdown
Member

是不是在切换壁纸时检查当前壁纸是否为 index.theme 里所给定的壁纸会好一点?这样的话,如果用户主动设置了一个来自系统提供的(位于 /usr/share/wallpapers/deepin 下)但非与当前主题关联的壁纸,用户所选的壁纸也同样不会被因为切亮暗色而被设置走。另外还可以避免硬编码 /usr/share/wallpapers/deepin 这个路径。

cc @wineee

同意, /usr/share/wallpapers/deepin 完全也有可能是用户自己切换过的壁纸,检查是否和 index.theme 里所给定的壁纸一致的做法更准确

@dengbo11

dengbo11 commented May 5, 2023 •

Copy link
Copy Markdown
Contributor Author

是不是在切换壁纸时检查当前壁纸是否为 index.theme 里所给定的壁纸会好一点?这样的话,如果用户主动设置了一个来自系统提供的(位于 /usr/share/wallpapers/deepin 下)但非与当前主题关联的壁纸,用户所选的壁纸也同样不会被因为切亮暗色而被设置走。另外还可以避免硬编码 /usr/share/wallpapers/deepin 这个路径。

用户自定义设置的壁纸会放到和系统壁纸下不同的目录/usr/share/wallpapers/custom-wallpapers下, 如果用户主动设置了一个来自系统提供的壁纸,也会当成用户自定义壁纸拷贝到/usr/share/wallpapers/custom-wallpapers下去

@wineee wineee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原来有拷贝行为,这提醒我 NixOS DDE 的自定义壁纸一直是坏的,那暂时先这样改吧

@dengbo11
dengbo11 merged commit 6268460 into linuxdeepin:master May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

【deepin_V23_beta】【一般】【有空】【内测反馈】【DDE】【桌面】主题“外观”切换时,会修改用户设置的桌面壁纸

4 participants