mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix TableWidget ( equipment ones ) on dark scheme.
This patch uses the class created by the previous patch to get rid of the CSS and be really desktop native. it fixes a lot of stuff in non-blue-styles and throws a lot of code away. <3 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c5c44e3a82
commit
0b5f9512ef
6 changed files with 13 additions and 42 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "tableview.h"
|
||||
#include "models.h"
|
||||
#include "modeldelegates.h"
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QLayout>
|
||||
|
@ -10,11 +11,7 @@
|
|||
TableView::TableView(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
QFile cssFile(":table-css");
|
||||
cssFile.open(QIODevice::ReadOnly);
|
||||
QTextStream reader(&cssFile);
|
||||
QString css = reader.readAll();
|
||||
ui.tableView->setStyleSheet(css);
|
||||
ui.tableView->setItemDelegate(new DiveListDelegate);
|
||||
/* There`s mostly a need for a Mac fix here too. */
|
||||
if (qApp->style()->objectName() == "gtk+")
|
||||
ui.groupBox->layout()->setContentsMargins(0, 9, 0, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue