mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Hide the useless go back button in the highlights panel
This commit is contained in:
parent
40de487795
commit
3fbb55d184
@ -484,7 +484,7 @@ class HighlightsPanel(QWidget):
|
||||
self.setFocusPolicy(Qt.FocusPolicy.NoFocus)
|
||||
self.l = l = QVBoxLayout(self)
|
||||
l.setContentsMargins(0, 0, 0, 0)
|
||||
self.search_input = si = SearchInput(self, 'highlights-search')
|
||||
self.search_input = si = SearchInput(self, 'highlights-search', show_return_button=False)
|
||||
si.do_search.connect(self.search_requested)
|
||||
l.addWidget(si)
|
||||
|
||||
|
@ -407,7 +407,7 @@ class SearchInput(QWidget): # {{{
|
||||
cleared = pyqtSignal()
|
||||
go_back = pyqtSignal()
|
||||
|
||||
def __init__(self, parent=None, panel_name='search'):
|
||||
def __init__(self, parent=None, panel_name='search', show_return_button=True):
|
||||
QWidget.__init__(self, parent)
|
||||
self.ignore_search_type_changes = False
|
||||
self.l = l = QVBoxLayout(self)
|
||||
@ -477,6 +477,7 @@ class SearchInput(QWidget): # {{{
|
||||
rb.setToolTip(_('Go back to where you were before searching'))
|
||||
rb.clicked.connect(self.go_back)
|
||||
h.addWidget(rb)
|
||||
rb.setVisible(show_return_button)
|
||||
|
||||
def history_saved(self, new_text, history):
|
||||
if new_text:
|
||||
|
Loading…
x
Reference in New Issue
Block a user