Skip to content

Commit

Permalink
Anchorlist spacing and styling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
WarmCyan committed Aug 23, 2023
1 parent 911b299 commit 0052e46
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions icat/anchorlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,7 @@ def __init__(
self.anchor_buttons,
self.table,
],
width=table_width,
style_="padding-left: 0; padding-right: 0px;, padding-bottom: 0px;",
style_=f"padding-left: 0; padding-right: 0px; padding-bottom: 0px; width: {table_width}px;",
)
"""The full component layout for panel to display."""

Expand All @@ -451,7 +450,8 @@ def __init__(
)

self.anchor_settings_layout = v.Col(
children=[self.example_anchor_types_dropdown]
children=[self.example_anchor_types_dropdown],
style_=f"width: {table_width}px",
)

self.tabs_component = v.Tabs(
Expand Down Expand Up @@ -597,7 +597,15 @@ def _handle_pnl_possible_anchor_types_changed(self):
)

new_anchor_buttons.append(button_tooltip)
self.anchor_buttons.children = [self.expand_toggle_tooltip, *new_anchor_buttons]
self.anchor_buttons.children = [
self.expand_toggle_tooltip,
v.Html(
tag="p",
children=["New:"],
style_="margin-bottom: 0px; margin-left: 18px; margin-top: 4px; margin-right: 3px;",
),
*new_anchor_buttons,
]
self.refresh_anchors_table()

def _handle_ipv_default_example_anchor_type_changed(self, widget, event, data):
Expand Down Expand Up @@ -803,7 +811,7 @@ def _populate_anchor_types_col(self):
),
)

anchor_type_name = v.TextField(v_model=anchor_type_dict["name"], width=50)
anchor_type_name = v.TextField(v_model=anchor_type_dict["name"], width=100)
anchor_type_name.on_event(
"change",
partial(
Expand All @@ -827,6 +835,7 @@ def _populate_anchor_types_col(self):
anchor_type_name,
v.Html(
tag="p",
style_="color: grey;",
children=[
v.Html(
tag="small",
Expand Down Expand Up @@ -857,7 +866,7 @@ def _populate_anchor_types_col(self):
"SimilarityAnchorBase",
]:
new_anchor_type_name_text = v.TextField(
v_model=anchor_type.__qualname__, width=50
v_model=anchor_type.__qualname__, width=100
)
add_btn = v.Btn(
children=["add"],
Expand All @@ -878,7 +887,20 @@ def _populate_anchor_types_col(self):
v.Col(
children=[
new_anchor_type_name_text,
v.Html(tag="p", children=[f"({str(anchor_type)})"]),
v.Html(
tag="p",
style_="color: grey;",
children=[
v.Html(
tag="small",
children=[f"({str(anchor_type)})"],
)
],
),
v.Html(
tag="p",
children=[f"{anchor_type.DESCRIPTION}"],
),
]
),
add_btn,
Expand Down

0 comments on commit 0052e46

Please sign in to comment.