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

Additional style options #173

Closed
dwreeves opened this issue Apr 8, 2024 · 1 comment
Closed

Additional style options #173

dwreeves opened this issue Apr 8, 2024 · 1 comment

Comments

@dwreeves
Copy link
Collaborator

dwreeves commented Apr 8, 2024

Options for panel for arguments:

ALIGN_ARGUMENTS_PANEL: "rich.align.AlignMethod" = "left"
STYLE_ARGUMENTS_TABLE_SHOW_LINES: bool = False
STYLE_ARGUMENTS_TABLE_LEADING: int = 0
STYLE_ARGUMENTS_TABLE_PAD_EDGE: bool = False
STYLE_ARGUMENTS_TABLE_PADDING: "rich.padding.PaddingDimensions" = (0, 1)
STYLE_ARGUMENTS_TABLE_BOX: "rich.style.StyleType" = ""
STYLE_ARGUMENTS_TABLE_ROW_STYLES: Optional[List["rich.style.StyleType"]] = None
STYLE_ARGUMENTS_TABLE_BORDER_STYLE: Optional["rich.style.StyleType"] = None

Box for panels:

STYLE_OPTIONS_PANEL_BOX: "rich.style.StyleType" = ""
STYLE_COMMANDS_PANEL_BOX: "rich.style.StyleType" = ""
STYLE_ARGUMENTS_PANEL_BOX: "rich.style.StyleType" = ""

Also, change types for all the boxes to Union["rich.style.StyleType", rich.box.Box"], and do an isinstance() check before running the getattr().

@dwreeves
Copy link
Collaborator Author

Resolved via #178.

I ultimately did not go with the STYLE_ARGUMENTS_* options. Instead, you can specify the styles via OPTION_GROUPS. This is actually slightly preferable in that it is, effectively, backwards compatible.

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

No branches or pull requests

1 participant