From 6626e7d67e2b1a6adde94ec996e6dc7200015b82 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Fri, 2 Jun 2017 11:34:19 +1000 Subject: [PATCH 1/3] #438 Make settings icon lighter grey when inactive --- onionshare_gui/onionshare_gui.py | 1 + share/images/settings_inactive.png | Bin 0 -> 513 bytes 2 files changed, 1 insertion(+) create mode 100644 share/images/settings_inactive.png diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py index e6b02dc1..04384142 100644 --- a/onionshare_gui/onionshare_gui.py +++ b/onionshare_gui/onionshare_gui.py @@ -443,6 +443,7 @@ class OnionShareGui(QtWidgets.QMainWindow): Disable the Settings button while an OnionShare server is active. """ self.settings_button.setEnabled(not active) + self.settings_button.setIcon( QtGui.QIcon(common.get_resource_path('images/settings_inactive.png')) ) def closeEvent(self, e): common.log('OnionShareGui', 'closeEvent') diff --git a/share/images/settings_inactive.png b/share/images/settings_inactive.png new file mode 100644 index 0000000000000000000000000000000000000000..1b35201b804dd4bd20d3272419403735d88c983b GIT binary patch literal 513 zcmV+c0{;DpP)K z;Kz6j_tlq>CO8tqefA{;k?WlT&%iQJ1IoZcLf&6s6Zit`18hzU#(HdUAc(-oij$nv88`-M|kg zsN@k?cg}yzYz!bUvnk*xVQVUqR-FD-fMUXrerJJE&k8P^*&`G-3N`((veg{^cpby}R+Vgu;0bUW?rGyj$G(JjSOI6ktl}3l00000NkvXXu0mjf Dza!DZ literal 0 HcmV?d00001 From e9120fd87e06a957a19c00adb3743d007570a15e Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Sat, 3 Jun 2017 19:01:40 +1000 Subject: [PATCH 2/3] fix the settings icon so it only switches to inactive icon when server is active --- onionshare_gui/onionshare_gui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py index 04384142..33830e69 100644 --- a/onionshare_gui/onionshare_gui.py +++ b/onionshare_gui/onionshare_gui.py @@ -443,7 +443,8 @@ class OnionShareGui(QtWidgets.QMainWindow): Disable the Settings button while an OnionShare server is active. """ self.settings_button.setEnabled(not active) - self.settings_button.setIcon( QtGui.QIcon(common.get_resource_path('images/settings_inactive.png')) ) + if active: + self.settings_button.setIcon( QtGui.QIcon(common.get_resource_path('images/settings_inactive.png')) ) def closeEvent(self, e): common.log('OnionShareGui', 'closeEvent') From fccec9737dd008ed7999d3436d5c2e6704f9ef7e Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Sat, 3 Jun 2017 19:04:21 +1000 Subject: [PATCH 3/3] Need to actually ensure the dark settings icon is set back once server inactive again --- onionshare_gui/onionshare_gui.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py index 33830e69..449f89a6 100644 --- a/onionshare_gui/onionshare_gui.py +++ b/onionshare_gui/onionshare_gui.py @@ -445,6 +445,8 @@ class OnionShareGui(QtWidgets.QMainWindow): self.settings_button.setEnabled(not active) if active: self.settings_button.setIcon( QtGui.QIcon(common.get_resource_path('images/settings_inactive.png')) ) + else: + self.settings_button.setIcon( QtGui.QIcon(common.get_resource_path('images/settings.png')) ) def closeEvent(self, e): common.log('OnionShareGui', 'closeEvent')