- Timestamp:
- Jul 29, 2010, 3:51:24 PM (15 years ago)
- Location:
- trunk/src/gui/dialogs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/dialogs/qsidebar.cpp
r651 r765 66 66 option->state &= ~QStyle::State_Enabled; 67 67 } 68 } 69 70 QSize QSideBarDelegate::sizeHint (const QStyleOptionViewItem &option, 71 const QModelIndex &index) const 72 { 73 // Make the item height in the side bar little bit bigger than in the 74 // file list view (to emphasize it). Note that this is better than 75 // previously used enforcing the icon size on the list with setIconSize() 76 // because it doesn't cause icon scaling (whigh results in blurred images) 77 QSize size = QStyledItemDelegate::sizeHint(option, index); 78 int height = size.height(); 79 size.setHeight(height + height / 4); 80 return size; 68 81 } 69 82 … … 375 388 { 376 389 // ### TODO make icon size dynamic 377 setIconSize(QSize(24,24)); 390 //setIconSize(QSize(24,24)); 391 //setSpacing(4); 378 392 setUniformItemSizes(true); 379 393 urlModel = new QUrlModel(this); -
trunk/src/gui/dialogs/qsidebar_p.h
r651 r765 71 71 void initStyleOption(QStyleOptionViewItem *option, 72 72 const QModelIndex &index) const; 73 QSize sizeHint (const QStyleOptionViewItem &option, 74 const QModelIndex &index) const; 73 75 }; 74 76
Note:
See TracChangeset
for help on using the changeset viewer.