mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dynamic dive trip list column widths
Compute the default widths for the columns in the dive trip list from their header and (expected) content length rather than some fixed pixel sizes. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
10351b3495
commit
f18bcd6607
3 changed files with 63 additions and 8 deletions
|
@ -20,9 +20,11 @@ public:
|
|||
explicit StarWidgetsDelegate(QWidget *parent = 0);
|
||||
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
const QSize& starSize() const;
|
||||
|
||||
private:
|
||||
QWidget *parentWidget;
|
||||
QSize minStarSize;
|
||||
};
|
||||
|
||||
class ComboBoxDelegate : public QStyledItemDelegate {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue