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

offset has no effect on widgets in Grid #5279

Closed
Redbot opened this issue Nov 24, 2024 · 3 comments · Fixed by #5281
Closed

offset has no effect on widgets in Grid #5279

Redbot opened this issue Nov 24, 2024 · 3 comments · Fixed by #5281

Comments

@Redbot
Copy link

Redbot commented Nov 24, 2024

since 0.86.2 offset has no effect on widgets within a grid.

here's a grid from examples, modified to add a widget id and an offset to that id.

from textual.app import App, ComposeResult
from textual.widgets import Static


class GridLayoutExample(App):
    CSS_PATH = "grid_layout1.tcss"

    def compose(self) -> ComposeResult:
        yield Static("One", classes="box")
        yield Static("Two", classes="box")
        yield Static("Three", classes="box")
        yield Static("Four", classes="box")
        yield Static("Five", classes="box")
        yield Static("Six", classes="box", id="six")


if __name__ == "__main__":
    app = GridLayoutExample()
    app.run()
Screen {
    layout: grid;
    grid-size: 3 2;
}

.box {
    height: 100%;
    border: solid green;
}

#six {
    offset: 0 10;
}

0.86.1:
image

0.86.2:
image

Textual Diagnostics

Versions

Name Value
Textual 0.86.2
Rich 13.8.1

Python

Name Value
Version 3.12.6
Implementation CPython
Compiler MSC v.1940 64 bit (AMD64)
Executable C:\Users\thisguy\AppData\Local\Programs\Python\Python312\python.exe

Operating System

Name Value
System Windows
Release 11
Version 10.0.22631

Terminal

Name Value
Terminal Application Windows Terminal
TERM Not set
COLORTERM Not set
FORCE_COLOR Not set
NO_COLOR Not set

Rich Console options

Name Value
size width=116, height=69
legacy_windows False
min_width 1
max_width 116
is_terminal True
encoding utf-8
max_height 69
justify None
overflow None
no_wrap False
highlight None
markup None
height None
Copy link

We found the following entries in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

@willmcgugan
Copy link
Collaborator

Try v0.87.1

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 a pull request may close this issue.

2 participants