From 8f218c8c2b7089e79f03f338bc5194c17d836316 Mon Sep 17 00:00:00 2001 From: garak Date: Wed, 16 Oct 2019 12:24:38 -0400 Subject: [PATCH] fix inconsistent table header text size --- resources/themes/dark.qss | 8 ++++++++ resources/themes/midnight.qss | 8 ++++++++ src/ui/montabwidget.cpp | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/resources/themes/dark.qss b/resources/themes/dark.qss index 894d2bd1..a7efe6e1 100644 --- a/resources/themes/dark.qss +++ b/resources/themes/dark.qss @@ -305,3 +305,11 @@ QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { background: none; } + +/* Table Headers */ + +QHeaderView { + padding: 0px; + margin: 0px; + font: 12px; +} diff --git a/resources/themes/midnight.qss b/resources/themes/midnight.qss index 29e82170..879f1db4 100644 --- a/resources/themes/midnight.qss +++ b/resources/themes/midnight.qss @@ -304,3 +304,11 @@ QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { background: none; } + +/* Table Headers */ + +QHeaderView { + padding: 0px; + margin: 0px; + font: 12px; +} diff --git a/src/ui/montabwidget.cpp b/src/ui/montabwidget.cpp index aef21f3c..f1693bb3 100644 --- a/src/ui/montabwidget.cpp +++ b/src/ui/montabwidget.cpp @@ -26,7 +26,7 @@ void MonTabWidget::populate() { activeTabs = QVector(fields.size(), false); for (EncounterField field : fields) { - QTableWidget *table = new QTableWidget; + QTableWidget *table = new QTableWidget(this); table->setEditTriggers(QAbstractItemView::NoEditTriggers); table->setFocusPolicy(Qt::NoFocus); table->setSelectionMode(QAbstractItemView::NoSelection);