mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1063209 (24h-clock in full-screen ebook-reader [Enhancement])
This commit is contained in:
parent
d2419b8b1b
commit
4e5f5d2994
@ -522,7 +522,8 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
|
|||||||
|
|
||||||
def show_clock(self):
|
def show_clock(self):
|
||||||
self.clock_label.setVisible(True)
|
self.clock_label.setVisible(True)
|
||||||
self.clock_label.setText('99:99 AA')
|
self.clock_label.setText(QTime(22, 33,
|
||||||
|
33).toString(Qt.SystemLocaleShortDate))
|
||||||
self.clock_timer.start(1000)
|
self.clock_timer.start(1000)
|
||||||
self.clock_label.setStyleSheet(self.info_label_style%(
|
self.clock_label.setStyleSheet(self.info_label_style%(
|
||||||
'rgba(0, 0, 0, 0)', self.view.document.colors()[1]))
|
'rgba(0, 0, 0, 0)', self.view.document.colors()[1]))
|
||||||
@ -544,7 +545,7 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
|
|||||||
self.update_pos_label()
|
self.update_pos_label()
|
||||||
|
|
||||||
def update_clock(self):
|
def update_clock(self):
|
||||||
self.clock_label.setText(QTime.currentTime().toString('h:mm a'))
|
self.clock_label.setText(QTime.currentTime().toString(Qt.SystemLocaleShortDate))
|
||||||
|
|
||||||
def update_pos_label(self, *args):
|
def update_pos_label(self, *args):
|
||||||
if self.pos_label.isVisible():
|
if self.pos_label.isVisible():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user