Skip to content

UI theme settings#226

Merged
StephenNneji merged 15 commits into
RascalSoftware:mainfrom
MikeSullivan7:ui_theme_settings
Jun 5, 2026
Merged

UI theme settings#226
StephenNneji merged 15 commits into
RascalSoftware:mainfrom
MikeSullivan7:ui_theme_settings

Conversation

@MikeSullivan7
Copy link
Copy Markdown
Collaborator

@MikeSullivan7 MikeSullivan7 commented May 8, 2026

Issue #101

This PR impliments RasCAL being displayed in Light or Dark mode depending on the users system settings. As default, this will be synchronised with the OS settings, but it is possible to override this be explicitly selecting Light or Dark mode in the Settings Dialog.

Things to test:

  • Open RasCAL and check that it's appearance aligns with your OS Settings.
  • Close RasCAL, change your OS appearence settings, reopen RasCAL and check that it opens in the correct mode.
  • Open a Project and go to settings, change to opposite theme (e.g. Light -> Dark) and accept changes.
  • Reopen RasCAL and check it has remembered the most recent theme change.
  • Check that clicking "Reset to Defaults" in Settings changes the theme back to "system" mode.
image

@MikeSullivan7 MikeSullivan7 marked this pull request as ready for review May 11, 2026 14:19
Copy link
Copy Markdown
Contributor

@StephenNneji StephenNneji left a comment

Choose a reason for hiding this comment

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

Thanks, works as advertised on Windows and MacOS, the theme does not update properly on Linux because of QT-BUG the problem is fixed in newer PyQT versions - 6.10.2 worked for me.

Comment thread rascal2/theme.py Outdated
Comment thread requirements.txt Outdated
Copy link
Copy Markdown
Contributor

@StephenNneji StephenNneji left a comment

Choose a reason for hiding this comment

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

Thanks for the update. Sorry I missed this when I last tested: If I change the theme to for example dark from light and I click the cancel button, it stays dark. I think it should revert to light we can easily modify the cancel button slot to reset, I tested this

def cancel_settings(self):
    if SETTINGS.style != self.settings.style:
        change_ui_style(SETTINGS.style)
    self.reject()

Comment thread rascal2/dialogs/settings_dialog.py Outdated
@MikeSullivan7
Copy link
Copy Markdown
Collaborator Author

Thanks for the update. Sorry I missed this when I last tested: If I change the theme to for example dark from light and I click the cancel button, it stays dark. I think it should revert to light we can easily modify the cancel button slot to reset, I tested this

def cancel_settings(self):
    if SETTINGS.style != self.settings.style:
        change_ui_style(SETTINGS.style)
    self.reject()

Thanks for this check, I thought I covered the cancelling part but I missed it. Sorted it now :)

@StephenNneji StephenNneji merged commit 534faf5 into RascalSoftware:main Jun 5, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants