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 9068f3c commit 263c4c2a5094e191776744049800a6c3f9ae5b16
@@ -685,6 +685,8 @@ QTreeView#viewRules::indicator:checked

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

QHeaderView::section {
@@ -697,6 +697,8 @@ QTreeView#viewRules::indicator:checked

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

QHeaderView::section {
@@ -152,19 +152,18 @@ void QgisAppStyleSheet::buildStyleSheet( const QMap<QString, QVariant> &opts )
style += QStringLiteral( "QToolBar > QToolButton { padding: %1px; } " ).arg( toolbarSpacingInt );
}
}

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 ) );

6 comments on commit 263c4c2

@nirvn

This comment has been minimized.

Copy link
Contributor Author

@nirvn nirvn replied Jan 23, 2019

Before vs. now:
image

@Gustry

This comment has been minimized.

Copy link
Contributor

@Gustry Gustry replied Jan 23, 2019

Thanks.

I also noticed in the sublayer dialog (when you open an OSM file), it's not obvious to see which rows are selected in the new theme. Is-it on your list?

@nirvn

This comment has been minimized.

Copy link
Contributor Author

@nirvn nirvn replied Jan 23, 2019

@Gustry, could you attach a screenshot?

@Gustry

This comment has been minimized.

Copy link
Contributor

@Gustry Gustry replied Jan 23, 2019

screenshot from 2019-01-23 12-53-07

I had to think quickly which color is the selected/not selected.

@nirvn

This comment has been minimized.

Copy link
Contributor Author

@nirvn nirvn replied Jan 23, 2019

Haa that's not a bug, this is just you in need of getting familiar with the selected background color ;) I'm hoping the commits today adding selection background color to all widgets will make it easier to familiarize users faster.

Blend of Gray relies solely on shades of gray, hence the selection background being near white.

@nirvn

This comment has been minimized.

Copy link
Contributor Author

@nirvn nirvn replied Jan 23, 2019

That said, glad to see you're (trying to? :) ) adopt the new theme. C est super!

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