Skip to content
Permalink
Browse files

[themes] Fix selection color of the attribute table view widget

  • Loading branch information
nirvn committed Jan 23, 2019
1 parent 4cb722a commit 21af807539cee17187b71b2716fdb2323442094a
Showing with 11 additions and 9 deletions.
  1. +2 −0 resources/themes/Night Mapping/style.qss
  2. +9 −9 src/app/qgisappstylesheet.cpp
@@ -697,6 +697,8 @@ QTreeView#viewRules::indicator:checked

QTableView {
color: @text;
selection-background-color: @selection;
selection-color: @text;
}

QHeaderView::section {
@@ -156,17 +156,17 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap<QString, QVariant> &opts )
}

ss += style;
}

// Fix selection color on losing focus (Windows)
const QPalette palette = qApp->palette();
// Fix selection color on losing focus (Windows)
const QPalette palette = qApp->palette();

ss += QString( "QTableView {"
"selection-background-color: %1;"
"selection-color: %2;"
"}" )
.arg( palette.highlight().color().name(),
palette.highlightedText().color().name() );
ss += QString( "QTableView {"
"selection-background-color: %1;"
"selection-color: %2;"
"}" )
.arg( palette.highlight().color().name(),
palette.highlightedText().color().name() );
}

QgsDebugMsg( QStringLiteral( "Stylesheet built: %1" ).arg( ss ) );

0 comments on commit 21af807

Please sign in to comment.
You can’t perform that action at this time.