mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Kill the use of CSS - Fixes a Lot of issues on dark color schemes.
The css was done by me in the first days of subsurface for Qt, and it was a code that I was never proud of. Mostly because I tougth at the time that it was better to write it into CSS than to create a new class just to take care of the size of the default cell height on a tree view. Now I see that it was a biased approach since it created issues on dark color schemes and it also didn't make a 'native' experience on Gnome or OSX, only on KDE. This fixes that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b87cfa9666
commit
c5c44e3a82
5 changed files with 15 additions and 36 deletions
|
@ -22,9 +22,18 @@
|
|||
#include <QMenu>
|
||||
#include <QFileDialog>
|
||||
|
||||
class DiveListDelegate : public QStyledItemDelegate{
|
||||
public:
|
||||
DiveListDelegate(){}
|
||||
QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const {
|
||||
return QSize(50,22);
|
||||
}
|
||||
};
|
||||
|
||||
DiveListView::DiveListView(QWidget *parent) : QTreeView(parent), mouseClickSelection(false),
|
||||
sortColumn(0), currentOrder(Qt::DescendingOrder), searchBox(new QLineEdit(this))
|
||||
{
|
||||
setItemDelegate(new DiveListDelegate );
|
||||
setUniformRowHeights(true);
|
||||
setItemDelegateForColumn(DiveTripModel::RATING, new StarWidgetsDelegate());
|
||||
QSortFilterProxyModel *model = new QSortFilterProxyModel(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue