-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
[WIP] Implement color themes - closes #28 #65
Conversation
Looking at the this way me might end up with less content in the The big benefit for us is aswell that it is easier to reason about what colors we already use in the What do you think? |
@extrawurst can you provide an example |
pretty sure I missed some:
the trick is then to consider every new entry and reuse any color that is already in there (of course that will drive appropriate naming virtually impossible. But this way looking at gitui someone right aways know: "ok this yellow I see here is bad in my term color scheme, so I change yellow in the file and it is fixed in all places at once" |
I think having specific names for colors like 'selected_tab' can be confusing once we have used this color in other places but I agree that we don't have enough cases to try to generalize now. I will implement specific case for the moment as you specified. |
3b269b3
to
42447da
Compare
fixed
…On Tue, May 19, 2020 at 12:35 PM Stephan Dilly ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/app.rs
<#65 (comment)>:
> @@ -37,24 +39,32 @@ pub struct App {
revlog: Revlog,
status_tab: Status,
queue: Queue,
+ pub theme: Theme,
this can be private
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#65 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALZWZY4WKJXIWCXKM44YQTRSJOIJANCNFSM4NDLUMAA>
.
|
strange, the difference is not visible on windows. I try to reproduce on Linux. |
i have tried to reproduce it by looking at the diff. can you try again ? (feel free to fix if you know what's wrong) |
The idea was to include two themes and a way to auto detect which to use given terminals background color but I failed to find a way to auto detect so there is not much value in keeping both unless we find a way to auto detect. |
Yeah I reached out to the |
gone ! |
It is in! Thank you so much for all the effort!🚀 |
This PR refactors all color related code and creates an style that can be modified to create different color themes for the program. it also provides serialization to and from a config file. changes in this PR
Theme
struct to represent different colors and some helper functions.THEME
variable.serde
andron
crates for serialization. andlazy_static
for static init.~/.gitui/theme.ron
to load the theme or creates one with default values if not found.This PR alone at the current state is not enough to provide theming since many components don't specify any style and rely on defaults to draw elements. I have not yet looked into how to change these defaults.