summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaine2020-06-17 11:28:37 +0530
committerBlaine2020-06-17 11:28:37 +0530
commit8454d09145277d8236f5523b1cc7d4382db4fd3e (patch)
tree6e45e00f911533c6f5fd1e200799c7969def6d76
parentd7a39b9108800ecc1fa5740fc3607cd11d2853a8 (diff)
downloadChemical-PFD-8454d09145277d8236f5523b1cc7d4382db4fd3e.tar.gz
Chemical-PFD-8454d09145277d8236f5523b1cc7d4382db4fd3e.tar.bz2
Chemical-PFD-8454d09145277d8236f5523b1cc7d4382db4fd3e.zip
table styling
-rw-r--r--src/main/python/utils/streamTable.py6
-rw-r--r--src/main/resources/base/app.qss11
2 files changed, 10 insertions, 7 deletions
diff --git a/src/main/python/utils/streamTable.py b/src/main/python/utils/streamTable.py
index cc0a244..7aeceed 100644
--- a/src/main/python/utils/streamTable.py
+++ b/src/main/python/utils/streamTable.py
@@ -19,6 +19,10 @@ class streamTableModel(QAbstractTableModel):
return len(self.header)
def data(self, index, role):
+ if role == Qt.TextAlignmentRole:
+ return Qt.AlignHCenter
+ if role == Qt.BackgroundColorRole:
+ return Qt.white
if not index.isValid():
return None
elif role != Qt.DisplayRole:
@@ -129,7 +133,7 @@ class streamTable(QTableView):
w = self.verticalHeader().width() + 4
for i in range(self.model.columnCount()):
w += self.columnWidth(i)
- h = 4
+ h = 0
for i in range(self.model.rowCount()):
h += self.rowHeight(i)
return QRect(0, 0, w, h)
diff --git a/src/main/resources/base/app.qss b/src/main/resources/base/app.qss
index d7500c4..5650279 100644
--- a/src/main/resources/base/app.qss
+++ b/src/main/resources/base/app.qss
@@ -265,17 +265,16 @@ customTabWidget customView {
padding: 5px;
border-radius: 2px;
}
-
+QHeaderView {
+ qproperty-defaultAlignment: AlignHCenter;
+}
QHeaderView::section {
padding: 4px;
border-style: none;
+ background-color: white;
}
-/* QHeaderView::section:vertical
-{
- border-left: 1px solid #fffff8;
-} */
-
QTableView {
border: none;
+ background-color: white;
} \ No newline at end of file