Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Unable to set shrink value to true in MarkdownViewer -> MarkdownTableOfContents. #5366

Closed
nocinskidawid opened this issue Dec 9, 2024 · 0 comments

Comments

@nocinskidawid
Copy link

Unable to set shrink value to true in MarkdownViewer -> MarkdownTableOfContents.

After getting MarkdownViewer I try to change the shrink value of TableOfContents to true:

markdown_viewer = self.query_exactly_one(MarkdownViewer)
markdown_viewer.table_of_contents.shrink = True

I try to do this in the on_mount method, but the text is not wrapped.
Is this the correct way to wrap text in TableOfContents or should I try something else?
Let me know if MRE is needed, but hopefully it will be a quick QA:)

DIAGNOSTICS

<!-- This is valid Markdown, please paste the following directly in to a GitHub issue -->
# Textual Diagnostics

## Versions

| Name    | Value  |
|---------|--------|
| Textual | 0.83.0 |
| Rich    | 13.7.0 |

## Python

| Name           | Value                                          |
|----------------|------------------------------------------------|
| Version        | 3.10.12                                        |
| Implementation | CPython                                        |
| Compiler       | GCC 11.4.0                                     |
| Executable     | /home/dev/.pyenv/versions/clive-env/bin/python |

## Operating System

| Name    | Value                                                            |
|---------|------------------------------------------------------------------|
| System  | Linux                                                            |
| Release | 6.8.0-49-generic                                                 |
| Version | #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov  6 17:42:15 UTC 2 |

## Terminal

| Name                 | Value          |
|----------------------|----------------|
| Terminal Application | GNOME Terminal |
| TERM                 | xterm-256color |
| COLORTERM            | truecolor      |
| FORCE_COLOR          | *Not set*      |
| NO_COLOR             | *Not set*      |

## Rich Console options

| Name           | Value                |
|----------------|----------------------|
| size           | width=135, height=43 |
| legacy_windows | False                |
| min_width      | 1                    |
| max_width      | 135                  |
| is_terminal    | True                 |
| encoding       | utf-8                |
| max_height     | 43                   |
| justify        | None                 |
| overflow       | None                 |
| no_wrap        | False                |
| highlight      | None                 |
| markup         | None                 |
| height         | None                 |


@Textualize Textualize deleted a comment from github-actions bot Dec 9, 2024
@Textualize Textualize locked and limited conversation to collaborators Dec 9, 2024
@willmcgugan willmcgugan converted this issue into discussion #5367 Dec 9, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant