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

[ui][python console] Fix hard to read python console editor icons #60261

Merged
merged 4 commits into from
Jan 29, 2025

Conversation

nirvn
Copy link
Contributor

@nirvn nirvn commented Jan 24, 2025

Description

This PR fixes #59772 by altering two icons to insure their visibility is OK on both light / gray / dark themes.

Blend of gray before:
Screenshot From 2025-01-24 16-30-14

Blend of gray after:
Screenshot From 2025-01-24 16-34-43

Night mapping before:
Screenshot From 2025-01-24 16-31-11

Night mapping after:
Screenshot From 2025-01-24 16-34-20

@nirvn nirvn changed the title [ui][pythonm console] Fix hard to read python console editor icons [ui][python console] Fix hard to read python console editor icons Jan 24, 2025
@github-actions github-actions bot added this to the 3.42.0 milestone Jan 24, 2025
@nirvn nirvn added GUI/UX Related to QGIS application GUI or User Experience Python Console Python Console backport release-3_40 labels Jan 24, 2025
Copy link

github-actions bot commented Jan 24, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 4390742)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 4390742)

@nyalldawson
Copy link
Collaborator

Instead of the buffer (which is a little ugly), how about using parameterised colors here? QgsApplication::getThemeIcon supports that already, so we could keep the single-color icon but render it using a suitable color based on the palette

@nirvn
Copy link
Contributor Author

nirvn commented Jan 26, 2025

@nyalldawson , done.

The ugly buffer is something we rely on for quite a few icons, eg:

image

We can fix that one day :)

@@ -261,7 +261,10 @@ def contextMenuEvent(self, e):

menu.addSeparator()
toggle_comment_action = QAction(
QgsApplication.getThemeIcon("console/iconCommentEditorConsole.svg"),
QgsApplication.getThemeIcon(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This icon is also used in python/plugins/processing/script/ScriptEditorDialog.py and src/gui/codeeditors/qgscodeeditor.cpp -- they'll also need the palette color set

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nyalldawson , done, thanks.

@nirvn nirvn force-pushed the python_console_icons_fix branch from ea47c46 to 4390742 Compare January 29, 2025 07:06
@nyalldawson nyalldawson merged commit b4b2dfd into qgis:master Jan 29, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-3_40 GUI/UX Related to QGIS application GUI or User Experience Python Console Python Console
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Barely visible icon within Python editor in grey theme
2 participants