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

Feature/set theme #374

Merged
merged 32 commits into from
Oct 9, 2023
Merged

Feature/set theme #374

merged 32 commits into from
Oct 9, 2023

Conversation

thoellt
Copy link
Collaborator

@thoellt thoellt commented Aug 30, 2023

Allows changing the theme on macOS with options for light, dark and light/dark following the system.

Changes to individual widgets should also work on Windows, once themeing is activated there, currently there should be no visible differences on windows, running the default light theme.

The main area still open are many icons rendered and saved to the widgets either manually or using the icon font.

This is still a work in progress, but at this point there should be no digression compared to the current state, so I am opening the PR.

thoellt and others added 25 commits August 8, 2023 17:09
Adds possibility to set Icon by name in WidgetAction base class. This allows for WidgetAction to listen for theme changes and update the icon pixmap itself, instead of implementing this for every widget containing an icon. Example use for eye icon in StartPageContentWidget. The icon will always use the themes text color. For using custom colors, icons still need to be implemented using setIcon and be refreshed manually on theme change.

note: updating WidgetActions signature requires recompiling plugins

[skip ci]
…Action

Replaces all instances of setIcon(Application::getIconFont("FontAwesome").getIcon(…)) with setIconByName(…) for dynamic generation and updating of icon colors according to theme.
Add group actions to groups action widget at initialization
@thoellt
Copy link
Collaborator Author

thoellt commented Oct 5, 2023

I will not be able to get the remaining icons to draw in light and dark themes before release, so for now, this version makes sure that on macOS only the light theme is used, as otherwise some icons are not legible.

@thoellt thoellt marked this pull request as ready for review October 5, 2023 15:20
@JulianThijssen
Copy link
Contributor

JulianThijssen commented Oct 6, 2023

For some reason it fails to build HDPS for me, saying ads::internal::repolishStyle is unresolved. Looking into the library I don't see it exported as a function there either, but not sure why not. Interesting that it works on the CI. Will investigate further.

@JulianThijssen
Copy link
Contributor

Okay, so the function repolishStyle is not exported when ADS is built as a shared library, which is to be expected as its part of the internal namespace. When building it as a static library, which likely happens on the CI, no exported is necessary so it works fine. As far as I know we want to use it as a shared library though.

# Conflicts:
#	HDPS/cmake/CMakeHdpsSourcesPublic.cmake
#	HDPS/src/AbstractSettingsManager.h
#	HDPS/src/Project.cpp
#	HDPS/src/actions/ProjectSplashScreenAction.cpp
#	HDPS/src/private/SettingsManager.cpp
#	HDPS/src/private/SettingsManager.h
#	HDPS/src/private/SettingsManagerDialog.cpp
#	HDPS/src/private/WorkspaceManager.cpp
@thoellt
Copy link
Collaborator Author

thoellt commented Oct 9, 2023

Okay, so the function repolishStyle is not exported when ADS is built as a shared library, which is to be expected as its part of the internal namespace. When building it as a static library, which likely happens on the CI, no exported is necessary so it works fine. As far as I know we want to use it as a shared library though.

I have reimplemented the relevant Qt code directly in place, to avoid calling ADS in e799438.

@JulianThijssen
Copy link
Contributor

It compiles properly for me now, and seems to run.

@thoellt thoellt merged commit 4eea562 into master Oct 9, 2023
3 of 6 checks passed
@thoellt thoellt deleted the feature/set_theme branch October 9, 2023 11:57
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.

3 participants