weixin_39795292
weixin_39795292
2020-12-09 13:19

Icons overhaul

During investigating of issues https://github.com/AntiMicroX/antimicrox/issues/56 and https://github.com/AntiMicroX/antimicrox/issues/58 I have found out, there is a pretty big mess in terms of small icons used by AntiMicroX.

Currently, custom icons are both compiled into binary files (but they are broken because of wrong paths in code) and they are added as a part of system theme called hicolor.
To ensure usage of these icons theme used by app is overridden to be hicolor, this solution is very not elegant, duplicates loading of the same icons and can be problematic to use with some themes.

c++
    updateJoy->setIcon(QIcon::fromTheme(QString::fromUtf8("view_refresh"), QIcon(":/icons/hicolor/16x16/actions/view_refresh.png")));

I think it would be better to use icons supplied by system-wide theme, because some of our icon look a bit out of place in some cases, and we should use our old icons as a fallback option in case of problems with themed icons.

I think we could also think about updating some of these icons, because some of them look a bit out of date:
document_saveedit_clear_listdocument_revert_small...

TL;TR Things to do: - [x] use default system-wide icons (https://github.com/AntiMicroX/antimicrox/pull/62 https://github.com/AntiMicroX/antimicrox/pull/71) - [x] fix fallback links to embedded icons (compiled into binary files of antimicrox) (https://github.com/AntiMicroX/antimicrox/pull/75) - [x] remove already embedded icons from list of installed elements (https://github.com/AntiMicroX/antimicrox/pull/72) - [x] add light/dark variants of system tray icon https://github.com/AntiMicroX/antimicrox/issues/66 - [ ] (optional) update default icons

该提问来源于开源项目:AntiMicroX/antimicrox

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

11条回答

  • weixin_39795292 weixin_39795292 5月前

    There is still problem with custom icons like:

    games_config_custom 16-actions-games_config_custom edit_table_delete_row 16-actions-edit_table_delete_row

    We should decide what to do with them.

    点赞 评论 复制链接分享
  • weixin_39821718 weixin_39821718 5月前

    Either remove from UI or replace with other items from the theme?

    点赞 评论 复制链接分享
  • weixin_39795292 weixin_39795292 5月前

    I will look after similar icons, maybe there are some alternatives. (The most universal tool for this is gtk3-icon-browser)

    点赞 评论 复制链接分享
  • weixin_39700063 weixin_39700063 5月前

    I don't know if this is the right place, but it seems to be adequate for what I mean (I don't want to duplicate the problem). I mean, some of the icons in the program are missing, e.g. for "Reset", "Load", "Save" or "Save As" button in the main window and by right-clicking on the tray icon you can also notice this lack after all these changes. Even more icons will be missing after merging changes from the "icons_cleanup" branch, which are also missing in such windows as "Advanced", window with virtual keyboard and more.

    点赞 评论 复制链接分享
  • weixin_39572152 weixin_39572152 5月前

    -design

    Out of curiosity, I compiled an unrolled version from the previous repository and there the problem described by you is not there, all icons are in place. Probably one of the commits of the new developers is responsible for this assumption. The question is - is it a bug or is it feauture?

    To ensure usage of these icons theme used by app is overridden to be hicolor, this solution is very not elegant, duplicates loading of the same icons and can be problematic to use with some themes.

    I know you'll find this to be a search for confrontation, but an inelegant solution has been replaced by a faulty one. It's not a search for a hoax, but a statement of fact from the end user's point of view.

    点赞 评论 复制链接分享
  • weixin_39795292 weixin_39795292 5月前

    I is clearly a bug. Btw branch 'icons_cleanup' is not ready to merge yet.

    点赞 评论 复制链接分享
  • weixin_39572152 weixin_39572152 5月前

    It is obvious that it is a bug. Are you able to determine more or less when it could have sneaked in or should I try to take back the latest commites one by one? I'm not hiding that I'm an aesthete and the lack of icons makes my eyes unsatisfied.

    点赞 评论 复制链接分享
  • weixin_39795292 weixin_39795292 5月前

    -design
    Thanks for report, I have identified the source of this problem, I have missed some of names when I was changing custom icon names to more universal ones.
    I have also missed some names placed in .ui files.

    点赞 评论 复制链接分享
  • weixin_39795292 weixin_39795292 5月前

    I think, after this merge we can close it for now.

    点赞 评论 复制链接分享
  • weixin_39821718 weixin_39821718 5月前

    Using system theme icons is a great idea because - It makes packaging easier (removing this and this) - Also users can choose icons according to their own icon theme.

    I think we can remove fallback if we use common icons. The system provides icon theme fallback mechanism anyway. Like, I'm using the Ubuntu Humanity theme, and the index.theme says: Inherits=Adwaita,hicolor So this fallback mechanism is there for all icon themes.

    Let me know if I can help with anything or take the task up altogether if you want to focus on other stuff.

    点赞 评论 复制链接分享
  • weixin_39795292 weixin_39795292 5月前

    I would leave them, because on Windows and Mac they will be needed, but only as a compiled-in files (without installing them), moreover in case of any problems with some (badly prepared) themes fallback option is needed, because without it our app won't render some interface elements at all.

    点赞 评论 复制链接分享

相关推荐