Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【deepin_V23_beta3】【一般】【立即】【集成测试】【DDE】【launchpad】launchpad升级过程中,部分应用的图标消失 #6291

Closed
SuperEffie opened this issue Nov 27, 2023 · 9 comments
Labels
P3 一般优先 叶山山 叶山山 回归通过 回归通过

Comments

@SuperEffie
Copy link

SUMMARY | 问题概要

【关联集成】:issue: #6270

SOFTWARE/OS VERSIONS | 软件/系统版本信息

镜像地址:https://cdimage.uniontech.com/community/releases/23-Beta2/deepin-desktop-community-23-Beta2-amd64.iso
版本信息:dde-launchpad:0.2.2

PRE-REQUIREMENT | 预置条件

应用商店中下载应用:安兔兔测评

STEPS TO REPRODUCE | 复现步骤

  1. 添加集成仓库,下载最新版dde-launchpad
  2. 使用命令sudo apt install dcc-insider-plugin下载相关包,注销后重新登录进入桌面
  3. 控制中心-更新-技术预览选择预览版启动器后重启
  4. 点击任务栏中启动器图标,打开启动器
  5. 观察启动器左侧应用菜单,应用“安兔兔评测”前图标显示

OBSERVED RESULT | 观察到的结果

应用“安兔兔评测”前图标显示为空白
应用图标

EXPECTED RESULT | 期望的结果

应用“安兔兔评测”前图标正常显示

ADDITIONAL INFORMATION | 额外补充

No response

@SuperEffie SuperEffie added the P3 一般优先 label Nov 27, 2023
@babyfengfjx babyfengfjx assigned BLumia and unassigned babyfengfjx Nov 27, 2023
@babyfengfjx
Copy link

@BLumia 请进行优化。

@18202781743
Copy link

dsvg 无法显示 com.antutu.benchmark.svg,但qsvg可以,

@kegechen
Copy link

kegechen commented Dec 29, 2023

dsvgrender (librsvg2-dev + libcairo2-dev) 对这个 svg 图片解析失败。
原因是 cairo 解析 image 标签是是对比 data:image/png;base64, 这个字符串,比较严格。但是安兔兔的图标中用的是
xlink:href="data:img/png;base64 不规范的写法。不太想去适配。

不过 qtsvg 中是 找到 data 开头找到 base64, 的内容解析
浏览器也可以正常显示。

文件如下
com.antutu.benchmark.svg

// qtsvghandler
static QSvgNode *createImageNode(QSvgNode *parent,
                                 const QXmlStreamAttributes &attributes,
                                 QSvgHandler *handler){
...
    if (filename.startsWith(QLatin1String("data"))) {
        int idx = filename.lastIndexOf(QLatin1String("base64,"));
...
}

// cairo
static cairo_bool_t
render_element_image (cairo_svg_glyph_render_t *svg_render,
                      cairo_svg_element_t      *element,
                      cairo_bool_t              end_tag)
{
...
if (!string_match (&data, "data:image/png;base64,"))
        return FALSE;
...
}

@kegechen
Copy link

kegechen commented Dec 29, 2023

@babyfengfjx 可以尝试推动安兔兔改图标文件。 @zccrs

@kegechen kegechen assigned babyfengfjx and unassigned kegechen Jan 2, 2024
@babyfengfjx babyfengfjx assigned BLumia and kegechen and unassigned babyfengfjx and BLumia Jan 2, 2024
@babyfengfjx
Copy link

@kegechen 这个问题应该是因为我们采用了新的方案不兼容以前的内容,可以后面提供兼容方案,兼容此类不规范应用的图标显示问题。 按照目前系统的影响力来说,找安兔兔官方去修改也不太现实,此类应用可能还有很多,可能并非这一款,到时候可能都会遇到需要推动应用官方去整改的问题。

下图是老版本启动器正常显示的效果:
企业微信截图_17041587779220

@kegechen
Copy link

kegechen commented Jan 2, 2024

可能和图标大小有关。 @BLumia lanchpad是不是用的图标大小 8x8, 老版本启动器图标大小应该不是 8x8

 qtxdg-iconfinder com.antutu.benchmark
com.antutu.benchmark:com.antutu.benchmark:8
        /usr/share/icons/hicolor/128x128/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/16x16/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/24x24/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/256x256/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/32x32/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/48x48/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/512x512/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/64x64/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/96x96/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/scalable/apps/com.antutu.benchmark.svg

@18202781743
Copy link

可能和图标大小有关。 @BLumia lanchpad是不是用的图标大小 8x8, 老版本启动器图标大小应该不是 8x8

 qtxdg-iconfinder com.antutu.benchmark
com.antutu.benchmark:com.antutu.benchmark:8
        /usr/share/icons/hicolor/128x128/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/16x16/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/24x24/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/256x256/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/32x32/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/48x48/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/512x512/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/64x64/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/96x96/apps/com.antutu.benchmark.png
        /usr/share/icons/hicolor/scalable/apps/com.antutu.benchmark.svg

dde-launchpad里用的是dtkdeclarative的icon大小,为22X22的,

18202781743 added a commit to 18202781743/dtkdeclarative that referenced this issue Jan 3, 2024
  DSvgRender can't resolve some icon, e.g: `xlink:href="data:img/png;base64`
and we can find `png` firstly by modifing size to properly,

Issue: linuxdeepin/developer-center#6291
@kegechen
Copy link

kegechen commented Jan 4, 2024

@kegechen 这个问题应该是因为我们采用了新的方案不兼容以前的内容,可以后面提供兼容方案,兼容此类不规范应用的图标显示问题。 按照目前系统的影响力来说,找安兔兔官方去修改也不太现实,此类应用可能还有很多,可能并非这一款,到时候可能都会遇到需要推动应用官方去整改的问题。

下图是老版本启动器正常显示的效果: 企业微信截图_17041587779220

应用图标里面写错了不应该在我们这边适配。老launcher之所以显示是应为没有用到对应的错误图标,他提供了8个大小图标,有一个svg是错误的。不同大小可能就是用到不同的图标。我们能做的只有改变图标大小不使用这个错误的图标,而不是帮他去解决这个错误的写法

另外 【此类应用还有很多】 应该不会很多应用都写错了。

@SuperEffie
Copy link
Author

【镜像地址】:https://packagesupdate.uniontech.com/repo/uos-professional/image-beige/CUSTOM/lichenggang/20240102/deepin-23-beige-beta3-amd64-20240102-135617.iso
【关联集成】:https://github.com/linuxdeepin/developer-center/issues/6721、https://github.com/linuxdeepin/developer-center/issues/6666
【验证结论】:测试通过,关闭此issue。若是仅集成 #6721,应用图标显示为黑点,需先集成 #6666、再集成#6721;后指定版本安装
【截图信息】:
截图_选择区域_20240104141550

kegechen pushed a commit to linuxdeepin/dtkdeclarative that referenced this issue Jan 4, 2024
  DSvgRender can't resolve some icon, e.g: `xlink:href="data:img/png;base64`
and we can find `png` firstly by modifing size to properly,

Issue: linuxdeepin/developer-center#6291
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 一般优先 叶山山 叶山山 回归通过 回归通过
Projects
Status: CLOSED
Development

No branches or pull requests

5 participants