-
Notifications
You must be signed in to change notification settings - Fork 732
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
Apply color theme to docs as well #5477
Comments
Yes, some cleaning up would be a very good idea. IDE and help file renderer are not very well connected. |
There are a number of places where files are getting written to organise and keep defaults, especially in In this case: if there is a write error, say due to wrong permissions, the whole thing should still work. Then, I find that this is OK. There is already a place for rendered html, so there is no new folder to be created either. |
I created a branch #5487 in which the stylesheet is build via SCSS, a superset of CSS. I started by extracting all colors into variables and now want to consolidate the theme colors from around 40 to around 20(?) to make the look more consistent and creating new themes more easy. There are two things I struggle with:
Any thoughts and opinions on this would be appreciated One bug i found: the theme of the code within the docs does not match the default IDE style, see |
If it doesn't break if it is not found there, it should be fine to assume it unchanged by default. This should be refactored in a separate step that |
So, I think I wanna go back to this, but this time in a less invasive and more sustainable manner. The proposal is to simply skim through the CSS codebase and replace all hardcoded colors with plain CSS variables and unify them a bit while I am at it (I've already did this for the scss rewrite). These CSS variables are then loaded/set via JavaScript. Which CSS theme to load is defined by a cookie which can be accessed/set within the QtWebEngine. Maybe additionally there should be a way to set this from within the HTML Docs for static HTML websites as well as if one wants to have non-matching styles for docs/IDE. |
@capital-G thanks, this sounds like a better and a more sustainable approach. Of course the docs should still work when the help is served from outside the IDE - I personally think it would be fine if it defaults to the current theme in that case. |
Closed in favor of #6095 |
Motivation
Currently the documentation does not adjust to the selected Qt theme - this makes the dark themes not as usable as they could be because when opening the documentation on a dark theme one will be brightened by the light color scheme of the documentation.
Description of Proposed Feature
Currently the dark theme looks like this
I wrote a css file for the dracula theme so it can be adjusted
For each available Qt theme there would need to be a css file, but it has not to be limited by the Qt themes.
Plan for Implementation
While implementing the dracula theme I figured out that there are lots of inconsistencies in the styling.
I know that there is a heart for diverse implementations in SC but at the same time it makes it hard creating new color themes.
I would suggest writing a SASS file in which the style can easily be set for a theme - separating the arrangement from the color code in CSS.
Implementing a new theme for SC IDE/Docs can then become easier to manage.
Maybe this would have also the benefit that a more full screen friendly web version of the docs could be generated as well, see
The question is how the design should be applied when selected in Qt IDE? Maybe a simple
color_theme.css
gets copied/overwritten when a new theme is selected (like an additionalfrontend.css
- this is a bit prone to errors due to the file copying but as the IDE and static HTML pages have no other way to interact maybe this is the best way? This would also allow alternatives IDEs to use a styled CSS for the docs.The text was updated successfully, but these errors were encountered: