# Application and selected thumbnail style in CSS syntax.
# Examples:
-# default theme
-# appstyle=
-# selstyle=background-color: lightblue;
-# dark theme
-# appstyle=background-color: #181818; color: #a0a0a0;
-# selstyle=background-color: #b0b0b0; color: #202020;
+# Standard theme example:
+# appstyle=
+# selstyle=background-color: lightblue;
+# Dark theme example:
+# appstyle= * {background-color: #181818; color: #b0b0b0;}
+# :selected {background-color: #4a90d9; color: #f4f8fd;}
+# selstyle= background-color: #4a90d9; color: #f4f8fd;
appstyle=
selstyle=background-color: lightblue;
for w in self.statdsp:
w.hide()
+ def esc_action(self):
+ if self.windowState() & Qt.WindowFullScreen:
+ self.showNormal()
+ for w in self.statdsp:
+ w.show()
+ else:
+ die(0)
+
def init_window(self, title):
self.setWindowTitle(title)
self.broken_img = sQPixmap(imgdata=_broken_img_png)
self.main_layout.addLayout(self.statbar)
self.setCentralWidget(self.main_frame)
- QShortcut('Esc', self).activated.connect(lambda: die(0))
+ QShortcut('Esc', self).activated.connect(self.esc_action)
QShortcut('Ctrl+Q', self).activated.connect(lambda: die(0))
QShortcut('Ctrl+W', self).activated.connect(lambda: die(0))
QShortcut('Ctrl+F', self).activated.connect(self.toggle_fullscreen)
def load_thumbs(item):
if item.vfile:
- eprint(0, "open ", item.vfile)
+ eprint(1, "open ", item.vfile)
dlg.close()
self.load_view(item.vfile)
refresh_button.clicked.connect(lambda: refresh_list(list_widget, outdir))
load_button = QPushButton("Load Thumbnails")
load_button.clicked.connect(lambda: load_thumbs_btn(list_widget))
+ load_button.setDefault(True)
close_button = QPushButton("Close")
close_button.clicked.connect(dlg.close)
- close_button.setDefault(True)
btn_layout.addWidget(load_button)
btn_layout.addWidget(refresh_button)
btn_layout.addWidget(remove_button)
thinfo['th'].append([ cnt, pictemplate % cnt, t ])
if ilabel and pbar:
ilabel.setText('%s / %d s' % (t.split('.')[0], thinfo['duration']))
- pbar.setValue(float(t) * 100 / thinfo['duration'])
+ if thinfo['duration']:
+ pbar.setValue(float(t) * 100 / thinfo['duration'])
QApplication.processEvents()
else:
print('\r%s / %d s ' % (t.split('.')[0], thinfo['duration']), end='', file=sys.stderr)