Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[themes] Fix selection color of the attribute table view widget
  • Loading branch information
nirvn committed Jan 23, 2019
1 parent 4cb722a commit 21af807
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions resources/themes/Night Mapping/style.qss
Expand Up @@ -697,6 +697,8 @@ QTreeView#viewRules::indicator:checked

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

QHeaderView::section {
Expand Down
18 changes: 9 additions & 9 deletions src/app/qgisappstylesheet.cpp
Expand Up @@ -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 ) );

Expand Down

0 comments on commit 21af807

Please sign in to comment.