Skip to content

Commit

Permalink
Equal height in row false by default (#9591)
Browse files Browse the repository at this point in the history
* changes

* add changeset

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 8, 2024
1 parent 17e6c84 commit 139152f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/easy-snakes-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gradio": minor
---

feat:Equal height in row false by default
2 changes: 1 addition & 1 deletion gradio/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ def __init__(
) # type: ignore
input_component_column = None

with Row(equal_height=False):
with Row():
if self.interface_type in [
InterfaceTypes.STANDARD,
InterfaceTypes.INPUT_ONLY,
Expand Down
2 changes: 1 addition & 1 deletion gradio/layouts/row.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(
height: int | str | None = None,
max_height: int | str | None = None,
min_height: int | str | None = None,
equal_height: bool = True,
equal_height: bool = False,
show_progress: bool = False,
):
"""
Expand Down
4 changes: 2 additions & 2 deletions guides/03_building-with-blocks/02_controlling-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ with gr.Blocks() as demo:
btn2 = gr.Button("Button 2")
```

By default, every element in a Row will have the same height. Configure this with the `equal_height` argument.
You can set every element in a Row to have the same height. Configure this with the `equal_height` argument.

```python
with gr.Blocks() as demo:
with gr.Row(equal_height=False):
with gr.Row(equal_height=True):
textbox = gr.Textbox()
btn2 = gr.Button("Button 2")
```
Expand Down

0 comments on commit 139152f

Please sign in to comment.