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

bug: fix selected text bg colour being wrong if only the fg colour was set #1021

Merged
merged 4 commits into from
Feb 18, 2023

Conversation

ClementTsang
Copy link
Owner

@ClementTsang ClementTsang commented Feb 18, 2023

Description

A description of the change, what it does, and why it was made. If relevant (such as any change that modifies the UI), please provide screenshots of the changes:

Fix selected text background colour being wrong if only the foreground colour was set, due to conflicting colour usage.

This is resolved by just using a single source of truth for the default selected text style. This PR also cleans up some duplicate colour code, and adds a test that originally failed.

Issue

If applicable, what issue does this address?

Closes: #1020

Testing

If relevant, please state how this was tested. All changes must be tested to work:

If this is a code change, please also indicate which platforms were tested:

  • Windows
  • macOS
  • Linux

Checklist

If relevant, ensure the following have been met:

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, doc pages, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts
  • If relevant, new tests were added (don't worry too much about coverage)

@ClementTsang ClementTsang changed the title rename file to be more generic fix selected text background colour being wrong if only the foreground colour was set Feb 18, 2023
@ClementTsang ClementTsang changed the title fix selected text background colour being wrong if only the foreground colour was set fix selected text bg colour being wrong if only the fg colour was set Feb 18, 2023
@ClementTsang ClementTsang changed the title fix selected text bg colour being wrong if only the fg colour was set bug: fix selected text bg colour being wrong if only the fg colour was set Feb 18, 2023
@codecov
Copy link

codecov bot commented Feb 18, 2023

Codecov Report

Base: 20.73% // Head: 20.96% // Increases project coverage by +0.23% 🎉

Coverage data is based on head (457f68f) compared to base (a266dd7).
Patch coverage: 66.66% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1021      +/-   ##
==========================================
+ Coverage   20.73%   20.96%   +0.23%     
==========================================
  Files          75       75              
  Lines       14683    14694      +11     
==========================================
+ Hits         3044     3081      +37     
+ Misses      11639    11613      -26     
Impacted Files Coverage Δ
src/bin/main.rs 36.58% <ø> (ø)
src/canvas.rs 0.00% <ø> (ø)
src/components/data_table/styling.rs 9.09% <ø> (ø)
src/options.rs 41.94% <ø> (ø)
src/widgets/cpu_graph.rs 0.00% <ø> (ø)
src/widgets/disk_table.rs 0.00% <ø> (ø)
src/widgets/process_table.rs 14.35% <ø> (ø)
src/widgets/temperature_table.rs 0.00% <ø> (ø)
src/canvas/canvas_styling.rs 45.80% <63.63%> (ø)
src/canvas/canvas_styling/colour_utils.rs 93.70% <100.00%> (ø)
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ClementTsang ClementTsang marked this pull request as ready for review February 18, 2023 05:23
@ClementTsang ClementTsang merged commit edc61d4 into master Feb 18, 2023
@ClementTsang ClementTsang deleted the fix_selected_text_default_bg branch February 18, 2023 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant