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

feat(block)!: allow custom symbols for borders #529

Merged
merged 2 commits into from Sep 24, 2023
Merged

Conversation

joshka
Copy link
Member

@joshka joshka commented Sep 22, 2023

Adds a new Block::border_set method that allows the user to specify
the symbols used for the border.

Added two new border types: BorderType::QuadrantOutside and
BorderType::QuadrantInside. These are used to draw borders using the
unicode quadrant characters (which look like half block "pixels").

▛▀▀▜
▌  ▐
▙▄▄▟

▗▄▄▖
▐  ▌
▝▀▀▘

Fixes: #528

BREAKING CHANGES:

  • BorderType::to_line_set is renamed to to_border_set
  • BorderType::line_symbols is renamed to border_symbols

Adds a new `Block::border_set` method that allows the user to specify
the symbols used for the border.

Added two new border types: `BorderType::QuadrantOutside` and
`BorderType::QuadrantInside`. These are used to draw borders using the
unicode quadrant characters (which look like half block "pixels").

▛▀▀▜
▌  ▐
▙▄▄▟

▗▄▄▖
▐  ▌
▝▀▀▘

Fixes: #528

BREAKING CHANGES:
- BorderType::to_line_set is renamed to to_border_set
- BorderType::line_symbols is renamed to border_symbols
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #529 (f5edea3) into main (c5ea656) will decrease coverage by 0.13%.
The diff coverage is 75.29%.

@@            Coverage Diff             @@
##             main     #529      +/-   ##
==========================================
- Coverage   90.01%   89.89%   -0.13%     
==========================================
  Files          40       40              
  Lines       11209    11279      +70     
==========================================
+ Hits        10090    10139      +49     
- Misses       1119     1140      +21     
Files Changed Coverage Δ
src/widgets/block.rs 91.27% <73.75%> (-2.18%) ⬇️
src/symbols.rs 75.75% <100.00%> (+3.34%) ⬆️

@joshka joshka merged commit 32e4619 into main Sep 24, 2023
34 of 36 checks passed
@joshka joshka deleted the wip-add-border-set branch September 24, 2023 05:08
tonogdlp pushed a commit to tonogdlp/ratatui that referenced this pull request Oct 6, 2023
Adds a new `Block::border_set` method that allows the user to specify
the symbols used for the border.

Added two new border types: `BorderType::QuadrantOutside` and
`BorderType::QuadrantInside`. These are used to draw borders using the
unicode quadrant characters (which look like half block "pixels").

QuadrantOutside:
```
▛▀▀▜
▌  ▐
▙▄▄▟
```

QuadrantInside:
```
▗▄▄▖
▐  ▌
▝▀▀▘
```
Fixes: ratatui-org#528

BREAKING CHANGES:
- BorderType::to_line_set is renamed to to_border_set
- BorderType::line_symbols is renamed to border_symbols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Corner borders for block
2 participants