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

Qt-material theme bug fix #2217

Merged
merged 3 commits into from
Jun 11, 2024
Merged

Qt-material theme bug fix #2217

merged 3 commits into from
Jun 11, 2024

Conversation

MikeSullivan7
Copy link
Collaborator

Issue

Closes #2209.

Description

When the Theme in the settings menu is changed to Fusion, the Stylesheet of the QApplication is reset correctly. The UI bugs were caused by the qt-material function apply_stylesheet changing the applications stylesheet and those changes persisting once the theme was changed back to Fusion.

Acceptance Criteria

Repeat the changes in the linked issue and check that the themes look as expected:

  1. Start Mantid Imaging
  2. Select File > Settings
  3. Select an alternative theme to Fusion
  4. Restart mantid Imaging
  5. Select File > Settings
  6. Select "Use OS Default"

Also change any and all combinations of settings in the Appearance Settings tab to check they are behaving correctly. MI should also correctly store and apply the last given settings upon startup.

Example screenshots are given here:

My default OS settings (I use dark mode!)

image

changing to a qt-material theme:

image

restarting MI and clicking the Use OS defaults checkbox:

image

Documentation

Release Note

@coveralls
Copy link

Coverage Status

coverage: 72.721% (-0.01%) from 72.735%
when pulling 992c492 on 2209_qt_material_theme_bug_fixes
into 4d2ef3e on main.

Copy link
Collaborator

@samtygier-stfc samtygier-stfc left a comment

Choose a reason for hiding this comment

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

I could not trigger the original issue on linux.

But change looks good, and all functional on linux. So happy to approve.

@JackEAllen
Copy link
Collaborator

I can give this a secondary review on Monday if not merged in by then having found the original issue 🙂

@JackEAllen JackEAllen self-requested a review June 11, 2024 08:29
Copy link
Collaborator

@JackEAllen JackEAllen left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for putting a fix in for this. I have tested on Linux and Windows.
I have replicated the bug on main on Windows and compared to the proposed changes which resolve the bug.

@JackEAllen JackEAllen added this pull request to the merge queue Jun 11, 2024
Merged via the queue into main with commit 37eba31 Jun 11, 2024
8 checks passed
@JackEAllen JackEAllen deleted the 2209_qt_material_theme_bug_fixes branch June 11, 2024 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

QT Material Theme OS Default on Startup Instability
4 participants