Skip to content

Commit

Permalink
Merge pull request #34 from kianmeng/fix-typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
docelic committed Feb 1, 2024
2 parents bd1e4f5 + f614ec3 commit 76142c5
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

- Overflow is currently property of screen and widget. See what the relation is and whether it all works correctly.

- For `OptimizationFlag`s listed in src/namespace.cr, make a list of all common terminal emulators and see which ones support which optimizations. Than make default optimizations turn on/off based on that (unless overriden by user).
- For `OptimizationFlag`s listed in src/namespace.cr, make a list of all common terminal emulators and see which ones support which optimizations. Than make default optimizations turn on/off based on that (unless overridden by user).
`OptimizationFlag`s are set on a `Screen`.

- In src/screen.cr, some stuff is done in initialize, while it seems like enter/leave would be the correct places.
Expand Down
2 changes: 1 addition & 1 deletion documentation/decorations.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ border repeats in all cells that make up the border. (See how this would interop
where docking would be performed.)

Additionally, in Crysterm there is `Crysterm::Style.default`. This default instance of style can be
modified and will automatically apply to all widgets that do not have style specifically overriden.
modified and will automatically apply to all widgets that do not have style specifically overridden.

## Padding

Expand Down
4 changes: 2 additions & 2 deletions documentation/positioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ relative position, width and height, and the amount of inner space
that is reserved for decorations (borders and padding).

For a given widget, it can also calculate what the minimum size bounding box is
(minimum box needed to accomodate all content without scrolling).
(minimum box needed to accommodate all content without scrolling).

Left, top, right and bottom values are not offsets from (0,0) on the top left, but rather from their respective sides.

Expand Down Expand Up @@ -234,4 +234,4 @@ When creating widgets, one can specify left/top/right/bottom/width/height separa
them all inside `position` hash. If they're given separately, Blessed packs them into `position`.

One can also specify `shrink = true` on a widget. This causes widget to render in minimal
necessary box to accomodate its content.
necessary box to accommodate its content.
2 changes: 1 addition & 1 deletion examples/colorchart.cr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def draw(s : Screen)
end
end

# `Display` is a phyiscal device (terminal hardware or emulator).
# `Display` is a physical device (terminal hardware or emulator).
# It can be instantiated manually as shown, or for quick coding it can be
# skipped and it will be created automatically when needed.
s = Screen.new
Expand Down
2 changes: 1 addition & 1 deletion examples/hello.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require "../src/crysterm"
class MyProg
include Crysterm

# `Display` is a phyiscal device (terminal hardware or emulator).
# `Display` is a physical device (terminal hardware or emulator).
# It can be instantiated manually as shown, or for quick coding it can be
# skipped and it will be created automatically when needed.
s = Screen.new title: "Hello, World!"
Expand Down
2 changes: 1 addition & 1 deletion src/action.cr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Crysterm
# Actions can be added to menus and toolbars, and will automatically be kept in sync because they are the same object.
# For example, if the user presses a "Bold" toolbar button in a text editor, the "Bold" menu item will automatically appear enabled where ever it is added.
#
# It is recommented to create `Action`s as children of the window they are used in.
# It is recommended to create `Action`s as children of the window they are used in.
#
# Actions are added to `Widget`s using `#addAction` or `<<(Action)`. Note that an action must be added to a widget before it can be used.
#
Expand Down
2 changes: 1 addition & 1 deletion src/fonts/README
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ If you need it than much, try mkitalic from FreeBSD or bdfslant from Debian.
Q. Scalable version?

A. Long story short, when the average display resolution becomes at least
150 DPI. Prefferably 200.
150 DPI. Preferably 200.

Q. How about some new characters?

Expand Down
4 changes: 2 additions & 2 deletions src/screen.cr
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ module Crysterm

bind

# ensure tput.zero_based = true, use_bufer=true
# ensure tput.zero_based = true, use_buffer=true
# set resizeTimeout

# Tput is accessed via tput
Expand Down Expand Up @@ -551,7 +551,7 @@ module Crysterm
# }
# end

# Reduces color if needed (minmal helper function)
# Reduces color if needed (minimal helper function)
private def _reduce_color(col)
Colors.reduce(col, tput.features.number_of_colors)
end
Expand Down
4 changes: 2 additions & 2 deletions src/screen_drawing.cr
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ module Crysterm
# whether an element has uniform cells on
# both sides. If it does, we can use CSR to
# optimize scrolling on a scrollable element.
# Not exactly sure how worthwile this is.
# Not exactly sure how worthwhile this is.
# This will cause a performance/cpu-usage hit,
# but will it be less or greater than the
# performance hit of slow-rendering scrollable
Expand All @@ -639,7 +639,7 @@ module Crysterm
# D O:
# The scrollbar can't update properly, and there's also a
# chance that the scrollbar may get moved around senselessly.
# NOTE: In pratice, this doesn't seem to be the case.
# NOTE: In practice, this doesn't seem to be the case.
# if @scrollbar
# return pos._clean_sides = false
# end
Expand Down
2 changes: 1 addition & 1 deletion src/widget/list.cr
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ module Crysterm
emit Crysterm::Event::CancelItem, items[selected], selected
end

# TOOD
# TODO
# find
# pick

Expand Down
6 changes: 3 additions & 3 deletions src/widget_size.cr
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module Crysterm
return width
end

# This is for if the element is being streched or shrunken.
# This is for if the element is being stretched or shrunken.
# Although the width for shrunken elements is calculated
# in the render function, it may be calculated based on
# the content width, and the content width is initially
Expand Down Expand Up @@ -96,7 +96,7 @@ module Crysterm
return height
end

# This is for if the element is being streched or shrunken.
# This is for if the element is being stretched or shrunken.
# Although the height for shrunken elements is calculated
# in the render function, it may be calculated based on
# the content height, and the content height is initially
Expand Down Expand Up @@ -163,7 +163,7 @@ module Crysterm

# Since the parent element is shrunk, and the child elements think it's
# going to take up as much space as possible, an element anchored to the
# right or bottom will inadvertantly make the parent's shrunken size as
# right or bottom will inadvertently make the parent's shrunken size as
# large as possible. So, we can just use the height and/or width the of
# element.
# D O:
Expand Down

0 comments on commit 76142c5

Please sign in to comment.