Skip to content

Commit

Permalink
Remove scrollbars on inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
proy30 committed Feb 21, 2025
1 parent a3ed771 commit 14111d4
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def card(self):
Creates UI content for CSR.
"""

with vuetify.VCard(style=("card_style",)):
with vuetify.VCard():
CardComponents.input_header("CSR")
with vuetify.VCardText(**self.CARD_TEXT_OVERFLOW):
with vuetify.VRow(**self.ROW_STYLE):
Expand Down
11 changes: 0 additions & 11 deletions src/python/impactx/dashboard/Input/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,3 @@ class UIDefaults:
"display": "flex",
"flex-direction": "column",
}

@staticmethod
def adjust_card_height(space_charge, csr):
state.card_height = "33.33vh" if (space_charge or csr) else "50vh"

CARD_SIZING = {
"max-height": f"calc({state.card_height} - {ToolbarDefaults.TOOLBAR_SIZE + ToolbarDefaults.FOOTER_SIZE}px)",
"transition": "max-height 0.5s",
}

state.card_style = UIDefaults.CARD_STYLE | CARD_SIZING
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def card(self):
"""
Creates UI content for beam distribution.
"""
with vuetify.VCard(style=("card_style",)):
with vuetify.VCard():
CardComponents.input_header("Distribution Parameters")
with vuetify.VCardText(**self.CARD_TEXT_OVERFLOW):
with vuetify.VRow(**self.ROW_STYLE):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,12 @@ def on_kin_energy_unit_change(**kwargs) -> None:
if state.kin_energy_on_ui != 0:
InputFunctions.update_kin_energy_sim_value()

@state.change("space_charge", "csr")
def update_card_height(space_charge, csr, **kwargs):
UIDefaults.adjust_card_height(space_charge, csr)

def card(self):
"""
Creates UI content for beam properties.
"""

with vuetify.VCard(style=("card_style",)):
with vuetify.VCard():
CardComponents.input_header("Input Parameters")
with vuetify.VCardText(**self.CARD_TEXT_OVERFLOW):
with vuetify.VRow(**self.ROW_STYLE):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,7 @@ def configuration_list(self):
"""
Displays the configuration for lattice elements.
"""
with vuetify.VCard(
style=("expand_configuration ? 'height: 100%' : card_style",)
):
with vuetify.VCard():
CardComponents.input_header(
"Lattice Configuration",
additional_components={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def card(self):
):
SpaceChargeConfiguration.dialog_settings()

with vuetify.VCard(style=("card_style",)):
with vuetify.VCard():
CardComponents.input_header(
"Space Charge", additional_components={"start": multigrid_settings}
)
Expand Down

0 comments on commit 14111d4

Please sign in to comment.