mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
API to toggle uniform item sizes
This commit is contained in:
parent
95abe9d072
commit
8a76807594
@ -74,12 +74,19 @@ class HistoryLineEdit2(LineEdit, HistoryMixin):
|
|||||||
def __init__(self, parent=None, completer_widget=None, sort_func=lambda x:b''):
|
def __init__(self, parent=None, completer_widget=None, sort_func=lambda x:b''):
|
||||||
LineEdit.__init__(self, parent=parent, completer_widget=completer_widget, sort_func=sort_func)
|
LineEdit.__init__(self, parent=parent, completer_widget=completer_widget, sort_func=sort_func)
|
||||||
|
|
||||||
|
def set_uniform_item_sizes(self, on=False):
|
||||||
|
if hasattr(self.mcompleter, 'setUniformItemSizes'):
|
||||||
|
self.mcompleter.setUniformItemSizes(on)
|
||||||
|
|
||||||
|
|
||||||
class HistoryComboBox(EditWithComplete, HistoryMixin):
|
class HistoryComboBox(EditWithComplete, HistoryMixin):
|
||||||
|
|
||||||
def __init__(self, parent=None, strip_completion_entries=True):
|
def __init__(self, parent=None, strip_completion_entries=True):
|
||||||
EditWithComplete.__init__(self, parent, sort_func=lambda x:b'', strip_completion_entries=strip_completion_entries)
|
EditWithComplete.__init__(self, parent, sort_func=lambda x:b'', strip_completion_entries=strip_completion_entries)
|
||||||
|
|
||||||
|
def set_uniform_item_sizes(self, on=False):
|
||||||
|
self.lineEdit().mcompleter.setUniformItemSizes(on)
|
||||||
|
|
||||||
|
|
||||||
class ColorButton(QPushButton):
|
class ColorButton(QPushButton):
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user