Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ux] Layer items don't match their expected colors in the Usability Hub Topping Maker Wizard for non-default QGIS themes #939

Open
gacarrillor opened this issue Jun 24, 2024 · 0 comments
Labels

Comments

@gacarrillor
Copy link
Collaborator

This is how LayerModel items look like in non-default QGIS themes:

image

image

The issue

The LayerModel.data()'s returned value for the Qt.BackgroundRole role is being overridden by a global stylesheet set by the non-default QGIS themes (like Night Mapping theme):

QTreeView::item, QTreeView::branch {
	background: transparent;
	color: @textlight;
}

One might expect that even having a global stylesheet, one could set the item background via Qt.BackgroundRole, but the current behavior is well known in Qt and considered as a feature, rather than a bug. For reference, some related links:

https://forum.qt.io/topic/95940/model-backgroundrole-overridden-by-style-sheet
https://bugreports.qt.io/browse/QTBUG-70100

Suggestion

Instead of using colors, add a text clue for non-INTERLIS layers (e.g., My Layer*) and in the legend below the QTreeView, replace color symbols by something like *: Non-INTERLIS layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant