diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp index ef29c05e61..849785ff01 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp @@ -411,18 +411,6 @@ namespace AzQtComponents } break; - case CE_HeaderSection: - { - if (qobject_cast(widget)) - { - if (TableView::drawHeaderSection(this, option, painter, widget, m_data->tableViewConfig)) - { - return; - } - } - } - break; - case CE_ComboBoxLabel: { if (qobject_cast(widget)) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TableView.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TableView.cpp index f5cb90ae1a..b4b49bdcec 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TableView.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TableView.cpp @@ -38,7 +38,6 @@ namespace AzQtComponents ConfigHelpers::read(settings, QStringLiteral("FocusBorderWidth"), config.focusBorderWidth); ConfigHelpers::read(settings, QStringLiteral("FocusBorderColor"), config.focusBorderColor); ConfigHelpers::read(settings, QStringLiteral("FocusFillColor"), config.focusFillColor); - ConfigHelpers::read(settings, QStringLiteral("HeaderFillColor"), config.headerFillColor); settings.endGroup(); return config; @@ -52,7 +51,6 @@ namespace AzQtComponents config.focusBorderWidth = 1; config.focusBorderColor = QStringLiteral("#94D2FF"); config.focusFillColor = QStringLiteral("#10ffffff"); - config.headerFillColor = QStringLiteral("#2d2d2d"); return config; } @@ -177,22 +175,6 @@ namespace AzQtComponents return true; } - bool TableView::drawHeaderSection(const Style* style, const QStyleOption* option, QPainter* painter, const QWidget* widget, const Config& config) - { - Q_UNUSED(widget); - Q_UNUSED(style); - - const auto headerViewOption = qstyleoption_cast(option); - if (!headerViewOption) - { - return false; - } - - painter->fillRect(headerViewOption->rect, config.headerFillColor); - - return true; - } - bool TableView::drawFrameFocusRect(const Style* style, const QStyleOption* option, QPainter* painter, const Config& config) { Q_UNUSED(style); diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TableView.h b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TableView.h index 99fb77c3d8..6187f44dd5 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TableView.h +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TableView.h @@ -62,7 +62,6 @@ namespace AzQtComponents qreal focusBorderWidth; QColor focusBorderColor; QColor focusFillColor; - QColor headerFillColor; }; /*! @@ -93,7 +92,6 @@ namespace AzQtComponents private: static bool drawHeader(const Style* style, const QStyleOption* option, QPainter* painter, const QWidget* widget, const Config& config); - static bool drawHeaderSection(const Style* style, const QStyleOption* option, QPainter* painter, const QWidget* widget, const Config& config); static bool drawFrameFocusRect(const Style* style, const QStyleOption* option, QPainter* painter, const Config& config); static QRect itemViewItemRect(const Style* style, QStyle::SubElement element, const QStyleOptionViewItem* option, const QWidget* widget, const Config& config); static QSize sizeFromContents(const Style* style, QStyle::ContentsType type, const QStyleOption* option, const QSize& contentsSize, const QWidget* widget, const Config& config); diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TableView.qss b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TableView.qss index 47281eda7e..531a3378fa 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TableView.qss +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TableView.qss @@ -66,7 +66,7 @@ QTreeView QHeaderView::section { height: 24px; - background: #444444; + background: #2d2d2d; border: none; font-size: 12px; diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Gallery/TableViewPage.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Gallery/TableViewPage.cpp index 788ba62366..24e65ac540 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Gallery/TableViewPage.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Gallery/TableViewPage.cpp @@ -134,6 +134,9 @@ TableViewPage::TableViewPage(QWidget* parent) auto logItemDelegate = new AzToolsFramework::Logging::LogTableItemDelegate(ui->logTableView); ui->logTableView->setItemDelegate(logItemDelegate); + // Example of changing the header section background color + ui->logTableView->setStyleSheet("QHeaderView::section { background: transparent; }"); + ui->qTableView->setModel(logModel); ui->qTableView->setAlternatingRowColors(true); ui->qTableView->setShowGrid(false);