mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix breakage on OS X machines with system style
This commit is contained in:
parent
0777df1bdd
commit
fd34b9dc1e
@ -343,7 +343,15 @@ class VLTabs(QTabBar): # {{{
|
|||||||
all_idx = i
|
all_idx = i
|
||||||
self.setCurrentIndex(all_idx if current_idx is None else current_idx)
|
self.setCurrentIndex(all_idx if current_idx is None else current_idx)
|
||||||
self.currentChanged.connect(self.tab_changed)
|
self.currentChanged.connect(self.tab_changed)
|
||||||
self.tabButton(all_idx, self.RightSide).setVisible(False)
|
try:
|
||||||
|
self.tabButton(all_idx, self.RightSide).setVisible(False)
|
||||||
|
except AttributeError:
|
||||||
|
try:
|
||||||
|
self.tabButton(all_idx, self.LeftSide).setVisible(False)
|
||||||
|
except AttributeError:
|
||||||
|
# On some OS X machines (using native style) the tab button is
|
||||||
|
# on the left
|
||||||
|
pass
|
||||||
|
|
||||||
def update_current(self):
|
def update_current(self):
|
||||||
self.rebuild()
|
self.rebuild()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user