Book list: Do not let the default layout have any column wider than 350 pixels

This commit is contained in:
Kovid Goyal 2010-06-11 22:30:58 -06:00
parent 78e4e41b7e
commit 129cd02292

View File

@ -292,7 +292,8 @@ class BooksView(QTableView): # {{{
old_state['column_positions'][name] = i old_state['column_positions'][name] = i
if name != 'ondevice': if name != 'ondevice':
old_state['column_sizes'][name] = \ old_state['column_sizes'][name] = \
max(self.sizeHintForColumn(i), h.sectionSizeHint(i)) min(350, max(self.sizeHintForColumn(i),
h.sectionSizeHint(i)))
if name == 'timestamp': if name == 'timestamp':
old_state['column_sizes'][name] += 12 old_state['column_sizes'][name] += 12
return old_state return old_state