Skip to content
Permalink
Browse files
Simplified 173e1d7
  • Loading branch information
m-kuhn committed Jan 13, 2014
1 parent 6febfd2 commit 385bb59
Showing 1 changed file with 8 additions and 13 deletions.
@@ -185,19 +185,14 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap<QString, QVariant>& opts )
}

// Fix selection color on loosing focus (Windows)
QApplication* app = dynamic_cast<QApplication*>( QgsApplication::instance() );
if ( app )
{
const QPalette palette = app->palette();

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

const QPalette palette = qApp->palette();

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

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

0 comments on commit 385bb59

Please sign in to comment.