mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 18:18:22 +00:00
doc fix
This commit is contained in:
parent
e4d5eda74b
commit
a28cf3a97e
2 changed files with 3 additions and 3 deletions
|
@ -131,7 +131,7 @@ To implement your own columns, extend the :class:`~rich.progress.ProgressColumn`
|
|||
Table Columns
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Rich builds a :class:`~rich.table.Table` for the tasks in the Progress instance. You can customize how the columns of this *tasks table* are created by specifying the `table_column` argument in the Column constructor, which should be a :class:`~rich.table.Column` instance.
|
||||
Rich builds a :class:`~rich.table.Table` for the tasks in the Progress instance. You can customize how the columns of this *tasks table* are created by specifying the ``table_column`` argument in the Column constructor, which should be a :class:`~rich.table.Column` instance.
|
||||
|
||||
The following example demonstrates a progress bar where the description takes one third of the width of the terminal, and the bar takes up the remaining third::
|
||||
|
||||
|
|
|
@ -25,13 +25,13 @@ class Constrain(JupyterMixin):
|
|||
if self.width is None:
|
||||
yield self.renderable
|
||||
else:
|
||||
child_options = options.update(width=min(self.width, options.max_width))
|
||||
child_options = options.update_width(min(self.width, options.max_width))
|
||||
yield from console.render(self.renderable, child_options)
|
||||
|
||||
def __rich_measure__(
|
||||
self, console: "Console", options: "ConsoleOptions"
|
||||
) -> "Measurement":
|
||||
if self.width is not None:
|
||||
max_width = min(self.width, options.max_width)
|
||||
options = options.update_width(self.width)
|
||||
measurement = Measurement.get(console, options, self.renderable)
|
||||
return measurement
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue