Merge branch 'image-group-to-folder-icon' into 'master'

Change the icons from groups to folders in the Images plugin, as per requests in the forums

See merge request openlp/openlp!448
This commit is contained in:
Tim Bentley 2022-04-02 09:54:52 +00:00
commit 23b58620ca

View File

@ -188,7 +188,7 @@ class ImageMediaItem(MediaManagerItem):
create_widget_action(self.list_view, separator=True) create_widget_action(self.list_view, separator=True)
create_widget_action( create_widget_action(
self.list_view, self.list_view,
text=UiStrings().AddGroup, icon=UiIcons().group, triggers=self.on_add_group_click) text=UiStrings().AddGroup, icon=UiIcons().folder, triggers=self.on_add_group_click)
create_widget_action( create_widget_action(
self.list_view, self.list_view,
text=translate('ImagePlugin', 'Add new image(s)'), text=translate('ImagePlugin', 'Add new image(s)'),
@ -205,7 +205,7 @@ class ImageMediaItem(MediaManagerItem):
Add custom buttons to the start of the toolbar. Add custom buttons to the start of the toolbar.
""" """
self.add_group_action = self.toolbar.add_toolbar_action('add_group_action', self.add_group_action = self.toolbar.add_toolbar_action('add_group_action',
icon=UiIcons().group, icon=UiIcons().folder,
triggers=self.on_add_group_click) triggers=self.on_add_group_click)
def add_end_header_bar(self): def add_end_header_bar(self):
@ -287,7 +287,7 @@ class ImageMediaItem(MediaManagerItem):
""" """
image_groups = self.manager.get_all_objects(ImageGroups, ImageGroups.parent_id == parent_group_id) image_groups = self.manager.get_all_objects(ImageGroups, ImageGroups.parent_id == parent_group_id)
image_groups.sort(key=lambda group_object: get_natural_key(group_object.group_name)) image_groups.sort(key=lambda group_object: get_natural_key(group_object.group_name))
folder_icon = UiIcons().group folder_icon = UiIcons().folder
for image_group in image_groups: for image_group in image_groups:
group = QtWidgets.QTreeWidgetItem() group = QtWidgets.QTreeWidgetItem()
group.setText(0, image_group.group_name) group.setText(0, image_group.group_name)