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

auto fix the detail row height, to match the radio set. #9

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions flameshow/render/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,20 @@ class FlameGraphApp(App):

DEFAULT_CSS = """
#span-detail-container {
height: 6;
}

#span-detail {
width: 1fr;
height: 1fr;
padding: 0 1;
border: round $secondary;
border-subtitle-align: left;
background: $boost;
content-align-vertical: middle;
}

#sample-type-radio {
width: 20%;
height: 1fr;
}

"""
Expand Down Expand Up @@ -123,14 +124,19 @@ def compose(self) -> ComposeResult:
# TODO for heap default to inuse bytes
options[self.sample_index].value = True
radioset = RadioSet(*options, id="sample-type-radio")
yield Horizontal(
detail_row = Horizontal(
Static(
id="span-detail",
),
radioset,
id="span-detail-container",
)

# set min height, 2 lines of detail + 2 lines border
detail_row.styles.height = max(4, len(options) + 2)

yield detail_row

yield FlameGraphScroll(
Vertical(id="flamegraph-container"),
id="flamegraph-out-container",
Expand Down