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

Add theme keys for the picker header area #11343

Merged
merged 2 commits into from
Jul 29, 2024

Conversation

ofzo
Copy link
Contributor

@ofzo ofzo commented Jul 27, 2024

full fill column's background for picker, it can be defined use

"ui.picker.header" = { fg= "white", bg = "red" }
image

Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the ui.picker.header key will change the meaning for it that I had in mind when introducing it. The current behavior is that the bg or modifiers (underlined for example) will only affect the column names. For example in my theme I have "ui.picker.header" = { underline.style = "line" }:

before

But if we apply the style to the header area:

after

I could see both ways being useful so I think we should change the keys around so that both are possible. Let's use ui.picker.header for the header (Row)'s style and introduce ui.picker.header.column that replaces the current use of ui.picker.header. Then ui.picker.header.active can move to ui.picker.header.column.active

We usually try to avoid breaking changes but these theme keys were merged very recently and no themes are using it in the runtime/themes dir yet so I think it's fine in this case.

helix-term/src/ui/info.rs Outdated Show resolved Hide resolved
helix-term/src/ui/picker.rs Outdated Show resolved Hide resolved
@ofzo ofzo force-pushed the feature/pretty-header branch from 4422d43 to 9d1c5e0 Compare July 27, 2024 17:25
@ofzo
Copy link
Contributor Author

ofzo commented Jul 28, 2024

@the-mikedavis I have resolve it.

Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good codewise. We just need to update the docs about these keys too:

helix/book/src/themes.md

Lines 300 to 301 in 6eae846

| `ui.picker.header` | Column names in pickers with multiple columns |
| `ui.picker.header.active` | The column name in pickers with multiple columns where the cursor is entering into. |

@ofzo ofzo force-pushed the feature/pretty-header branch from 9d1c5e0 to 2134b8a Compare July 29, 2024 13:33
@ofzo
Copy link
Contributor Author

ofzo commented Jul 29, 2024

@the-mikedavis yes ,the document has been supplemented.

book/src/themes.md Outdated Show resolved Hide resolved
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
@the-mikedavis the-mikedavis changed the title feat: pertty header Add theme keys for the picker header area Jul 29, 2024
@pascalkuthe pascalkuthe merged commit 08ac37d into helix-editor:master Jul 29, 2024
6 checks passed
@the-mikedavis the-mikedavis mentioned this pull request Jul 30, 2024
SofusA pushed a commit to SofusA/helix-pull-diagnostics that referenced this pull request Aug 4, 2024
* feat: pertty header

* 更新 themes.md

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
mxxntype pushed a commit to mxxntype/helix that referenced this pull request Aug 14, 2024
* feat: pertty header

* 更新 themes.md

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
kyruzic pushed a commit to kyruzic/helix that referenced this pull request Sep 27, 2024
* feat: pertty header

* 更新 themes.md

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
plul pushed a commit to plul/helix that referenced this pull request Oct 13, 2024
* feat: pertty header

* 更新 themes.md

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
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