-
-
Notifications
You must be signed in to change notification settings - Fork 69
Fix issue 244 #245
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
Merged
Merged
Fix issue 244 #245
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
36963f1
Added support for terminal default, and updated the default config to…
mcDevnagh 4b8beab
GetColorString now returns proper value for resetting the cview tag
mcDevnagh df21b0b
Ran `make gen`
makew0rld 98e296d
Change "none" to "default", and only allow it for backgrounds
mcDevnagh 60f7ee5
Focused text color becomes most readable color (White or Black) inste…
mcDevnagh c98fe11
merge origin into local
mcDevnagh 9316912
Merge branch 'makeworld-the-better-one:master' into master
mcDevnagh c84c261
GoLint fix
mcDevnagh b45873c
corrected luminance to match human perception
mcDevnagh 99b73d1
const gray is now the average of RGB, not the sum
mcDevnagh 8442c68
corrected order of operations
mcDevnagh 799f890
renamed GetReadableColor(bg) to GetContastingColor(color) and added c…
mcDevnagh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this function call, and all the others in this PR, incorrect? The function signature for
GetTextColor
isGetTextColor(key, bg string) tcell.Color
, which would indicate having"btn_bg"
second and"btn_text"
first. Or am I misunderstanding?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for focused UI elements, the text color and bg color swap. When focused, the button has text color of whatever
"btn_bg"
is set to, and a bg of whatever color"btn_text"
is set to.Because
"default"
is not a valid text color in the config, this function is always called with a key ending withbg
as its key, and abg
ending with text.I tried to be as concise as possible with the naming. Maybe
SwapColor(new_text_key, new_bg_key string)
or something similar would be less confusing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think it's good the way it is then, I just misunderstood.