Add icons to display mode combobox.

* src/vorta/assets/icons/view-list-details.svg : Add icon for flat list

* src/vorta/assets/icons/view-list-tree.svg : Add icon for tree

* src/vorta/views/diff_result.py (DiffDialog.set_icons)

* src/vorta/views/extract_dialog.py (ExtractDialog.set_icons)
This commit is contained in:
real-yfprojects 2022-07-15 15:38:53 +02:00
parent cbc0780caa
commit 56de55ed8b
No known key found for this signature in database
GPG Key ID: 00F630DFDEE25747
4 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill="#000000"
d="M 2 2 L 2 7 L 7 7 L 7 2 L 2 2 z M 8 2 L 8 3 L 14 3 L 14 2 L 8 2 z M 3 3 L 6 3 L 6 6 L 3 6 L 3 3 z M 8 5 L 8 6 L 14 6 L 14 5 L 8 5 z M 2 9 L 2 14 L 7 14 L 7 9 L 2 9 z M 8 9 L 8 10 L 12 10 L 12 9 L 8 9 z M 8 12 L 8 13 L 12 13 L 12 12 L 8 12 z "
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 381 B

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill="#000000"
d="M 2 2 L 2 7 L 6 7 L 6 12 L 7 12 L 9 12 L 9 14 L 14 14 L 14 9 L 9 9 L 9 11 L 7 11 L 7 7 L 7 5 L 9 5 L 9 7 L 14 7 L 14 2 L 9 2 L 9 4 L 7 4 L 7 2 L 2 2 z M 3 3 L 6 3 L 6 6 L 3 6 L 3 3 z M 10 3 L 13 3 L 13 6 L 10 6 L 10 3 z "
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 360 B

View File

@ -126,6 +126,9 @@ class DiffResultDialog(DiffResultBase, DiffResultUI):
"""Set or update the icons in the right color scheme."""
self.bCollapseAll.setIcon(get_colored_icon('angle-up-solid'))
self.bFoldersOnTop.setIcon(get_colored_icon('folder-on-top'))
self.comboBoxDisplayMode.setItemIcon(0, get_colored_icon("view-list-tree"))
self.comboBoxDisplayMode.setItemIcon(1, get_colored_icon("view-list-tree"))
self.comboBoxDisplayMode.setItemIcon(2, get_colored_icon("view-list-details"))
def treeview_context_menu(self, pos: QPoint):
"""Display a context menu for `treeView`."""

View File

@ -127,6 +127,8 @@ class ExtractDialog(ExtractDialogBase, ExtractDialogUI):
"""Set or update the icons in the right color scheme."""
self.bFoldersOnTop.setIcon(get_colored_icon('folder-on-top'))
self.bCollapseAll.setIcon(get_colored_icon('angle-up-solid'))
self.comboBoxDisplayMode.setItemIcon(0, get_colored_icon("view-list-tree"))
self.comboBoxDisplayMode.setItemIcon(1, get_colored_icon("view-list-tree"))
def slot_sorted(self, column, order):
"""React to the tree view being sorted."""