Browse Source

new Refresh context menu option instead of left mouse click on picture

master
Rinaldus 6 years ago
parent
commit
96664ad16a
  1. BIN
      icons/refresh.png
  2. 6
      photoframe.py
  3. 17
      resources.qrc
  4. 11330
      resources_rc.py

BIN
icons/refresh.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

6
photoframe.py

@ -84,7 +84,7 @@ class Window(QDialog): @@ -84,7 +84,7 @@ class Window(QDialog):
menu.addAction(QAction(QIcon(':icons/unlock.png'),"&Unlock", self, triggered=self.Unlock))
else:
menu.addAction(QAction(QIcon(':icons/lock.png'),"&Lock", self, triggered=self.Lock))
menu.addAction(QAction(QIcon(':icons/refresh.png'),"&Refresh", self, triggered=self.Refresh))
menu.addAction(QAction(QIcon(':icons/settings.png'),"&Settings", self, triggered=settings.show))
menu.addAction(QAction(QIcon(':icons/menu_quit.png'),"&Quit", self, triggered=QApplication.instance().quit))
menu.popup(self.mapToGlobal(point))
@ -103,8 +103,8 @@ class Window(QDialog): @@ -103,8 +103,8 @@ class Window(QDialog):
SettingsSave()
QApplication.instance().quit()
def mousePressEvent(self,event):
if ((event.buttons() == QtCore.Qt.LeftButton) and (SettingsExist())):
def Refresh(self):
if (SettingsExist()):
setPicture(programSettings.value("directory"))
def resizeEvent(self,event):

17
resources.qrc

@ -1,9 +1,10 @@ @@ -1,9 +1,10 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
<file>icons/dummy.png</file>
<file>icons/menu_quit.png</file>
<file>icons/settings.png</file>
<file>icons/lock.png</file>
<file>icons/unlock.png</file>
</qresource>
<RCC>
<qresource prefix="/">
<file>icons/refresh.png</file>
<file>icons/dummy.png</file>
<file>icons/menu_quit.png</file>
<file>icons/settings.png</file>
<file>icons/lock.png</file>
<file>icons/unlock.png</file>
</qresource>
</RCC>

11330
resources_rc.py

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save