ynput / ayon-core

Apache License 2.0
27 stars 33 forks source link

Tools: Use material symbols in UIs #593

Closed iLLiCiTiT closed 3 months ago

iLLiCiTiT commented 4 months ago

Changelog Description

Add material symbols to existing tools in ayon-core.

Additional info

Added qtmaterialsymbols custom implementation (similar to qtawesome) and use it in basic tools.

Screenshots

image

Testing notes:

  1. Tools should show same icons as AYON web UI does
BigRoy commented 4 months ago

Starting to look nice! :)

image

Also really like the folder and task icons.

image

They do appear slightly blurrier than the old ones though:

image

Maybe it's just not an optimal size usage for these icons? Hard to tell also because the old ones basically had no detail whatsoever.


No icons in scene inventory yet though - but hey, this is still just a draft PR

image

BigRoy commented 3 months ago
  • use status icon in combobox

  • add default behavior to simple folders and tasks widget

I believe these are now implemented? Or I'm not sure what these refer to. What's needed for this PR to be ready for review?

iLLiCiTiT commented 3 months ago

What's needed for this PR to be ready for review?

Simple folders widget don't use icons (should be simple modification of SimpleFoldersController). And select version combobox in scene inventory does not paint the icon (selection popup does, but not the selected one).

BigRoy commented 3 months ago
Traceback (most recent call last):
  File "E:\dev\ayon-core\client\ayon_core\tools\sceneinventory\view.py", line 309, in <lambda>
    lambda: self._show_version_dialog(item_ids, active_repre_id)
  File "E:\dev\ayon-core\client\ayon_core\tools\sceneinventory\view.py", line 746, in _show_version_dialog
    version_option = SelectVersionDialog.ask_for_version(
  File "E:\dev\ayon-core\client\ayon_core\tools\sceneinventory\select_version_dialog.py", line 215, in ask_for_version
    dialog.set_versions(version_options)
  File "E:\dev\ayon-core\client\ayon_core\tools\sceneinventory\select_version_dialog.py", line 207, in set_versions
    self._versions_combobox.set_versions(version_options)
  File "E:\dev\ayon-core\client\ayon_core\tools\sceneinventory\select_version_dialog.py", line 140, in set_versions
    icon = get_qt_icon({
  File "E:\dev\ayon-core\client\ayon_core\tools\utils\lib.py", line 563, in get_qt_icon
    return _IconsCache.get_icon(icon_def)
  File "E:\dev\ayon-core\client\ayon_core\tools\utils\lib.py", line 481, in get_icon
    cache_key = cls._get_cache_key(icon_def)
  File "E:\dev\ayon-core\client\ayon_core\tools\utils\lib.py", line 474, in _get_cache_key
    return "|".join(parts)
TypeError: sequence item 2: expected str instance, PySide2.QtGui.QColor found

Getting this error in Fusion also when clicking "Set version" in Scene Inventory. The pop-up dialog for setting versions does not show.

BigRoy commented 3 months ago

This is now fixed with https://github.com/ynput/ayon-core/pull/593/commits/909b6b9d1f244d34effd0cc219dd57663bb96b0e

But I'm now getting:

Traceback (most recent call last):
  File "E:\dev\ayon-core\client\ayon_core\tools\utils\delegates.py", line 223, in paint
    QtWidgets.QPalette.Normal
AttributeError: module 'qtpy.QtWidgets' has no attribute 'QPalette'
BigRoy commented 3 months ago

Nice.

All works.

I do wonder if the combobox (main entry, not the list) needs more padding/margins:

image

BigRoy commented 3 months ago

By the way, is the label "community contribution" correct on this PR?

iLLiCiTiT commented 3 months ago

I do wonder if the combobox (main entry, not the list) needs more padding/margins:

Where did you take the screenshot?

image

By the way, is the label "community contribution" correct on this PR?

Yes, I do it in my free time.

BigRoy commented 3 months ago

Where did you take the screenshot?

Good question! :)

This is in Maya 2024:

image

This is in Houdini 20.0.703:

image

This is in Fusion 18:

image

So I guess - ignore it?