mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 16:54:28 +02:00
Fix hidden donate button not really being hidden
This commit is contained in:
parent
ca19c14dfb
commit
615008a650
2 changed files with 5 additions and 2 deletions
|
|
@ -232,6 +232,7 @@ def contextMenuEvent(self, *args):
|
|||
pass
|
||||
|
||||
def build_bar(self):
|
||||
self.showing_donate = False
|
||||
showing_device = self.location_manager.has_device
|
||||
actions = '-device' if showing_device else ''
|
||||
actions = gprefs['action-layout-toolbar'+actions]
|
||||
|
|
@ -250,6 +251,7 @@ def build_bar(self):
|
|||
self.d_widget.setLayout(QVBoxLayout())
|
||||
self.d_widget.layout().addWidget(self.donate_button)
|
||||
self.addWidget(self.d_widget)
|
||||
self.showing_donate = True
|
||||
elif what in self.gui.iactions:
|
||||
action = self.gui.iactions[what]
|
||||
self.addAction(action.qaction)
|
||||
|
|
@ -292,7 +294,7 @@ def __init__(self, db):
|
|||
self._central_widget_layout = QVBoxLayout()
|
||||
self.centralwidget.setLayout(self._central_widget_layout)
|
||||
self.resize(1012, 740)
|
||||
self.donate_button = ThrobbingButton(self.centralwidget)
|
||||
self.donate_button = ThrobbingButton()
|
||||
self.location_manager = LocationManager(self)
|
||||
|
||||
self.iactions['Fetch News'].init_scheduler(db)
|
||||
|
|
|
|||
|
|
@ -252,7 +252,8 @@ def initialize(self, library_path, db, listener, actions, show_gui=True):
|
|||
|
||||
self.read_settings()
|
||||
self.finalize_layout()
|
||||
self.donate_button.start_animation()
|
||||
if self.tool_bar.showing_donate:
|
||||
self.donate_button.start_animation()
|
||||
self.set_window_title()
|
||||
|
||||
for ac in self.iactions.values():
|
||||
|
|
|
|||
Loading…
Reference in a new issue