From fdaaa780a4c44380d25fe2ac529373474231a49e Mon Sep 17 00:00:00 2001 From: Wojciech Zygmunt Porczyk Date: Thu, 10 Jul 2014 16:50:29 +0200 Subject: [PATCH] use new padlocks from theme --- qubesmanager/table_widgets.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qubesmanager/table_widgets.py b/qubesmanager/table_widgets.py index 029fb48..258dd3a 100644 --- a/qubesmanager/table_widgets.py +++ b/qubesmanager/table_widgets.py @@ -45,7 +45,10 @@ class VmIconWidget (QWidget): super(VmIconWidget, self).__init__(parent) self.label_icon = QLabel() - icon = QIcon (icon_path) + if icon_path[0] in ':/': + icon = QIcon (icon_path) + else: + icon = QIcon.fromTheme(icon_path) icon_sz = QSize (row_height * size_multiplier, row_height * size_multiplier) icon_pixmap = icon.pixmap(icon_sz, QIcon.Disabled if not enabled else QIcon.Normal) self.label_icon.setPixmap (icon_pixmap) @@ -137,7 +140,7 @@ class VmLabelWidget(VmIconWidget): return ":/off.png" else: self.value = vm.label.index - return vm.label.icon_path + return vm.label.icon