Skip to content

Commit ed06c07

Browse files
committed
IMPROVEMENT: Add detailed legend tooltips
1 parent aad98f6 commit ed06c07

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

MethodicConfigurator/frontend_tkinter_parameter_editor.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,18 +349,30 @@ def legend_frame(self, config_subframe: ttk.Frame, font_family: str) -> None:
349349
font_size = 8
350350
font = (font_family, font_size)
351351
np_label = ttk.Label(legend_left, text=_("Normal parameter"), font=font)
352+
show_tooltip(np_label, _("Normal parameter - reusable in similar vehicles"))
352353
np_label.pack(side=tk.TOP, anchor=tk.NW)
353354
cal_label = ttk.Label(legend_left, text=_("Calibration param"), background="yellow", font=font)
355+
show_tooltip(cal_label, _("Calibration parameter - not-reusable, even in similar vehicles"))
354356
cal_label.pack(side=tk.TOP, anchor=tk.NW)
355357
readonly_label = ttk.Label(legend_left, text=_("Read-only param"), background="red", font=font)
358+
show_tooltip(readonly_label, _("Read-only parameter - not writable nor changeable"))
356359
readonly_label.pack(side=tk.TOP, anchor=tk.NW)
357360
legend_right = ttk.Frame(legend_frame)
358361
legend_right.pack(side=tk.RIGHT, anchor=tk.NE)
359362
default_label = ttk.Label(legend_right, text=_("Default value"), background="lightblue", font=font)
363+
show_tooltip(default_label, _("This is the default value of this parameter"))
360364
default_label.pack(side=tk.TOP, anchor=tk.NW)
361365
na_label = ttk.Label(legend_right, text=_("Not available"), background="orange", font=font)
366+
show_tooltip(na_label, _("This parameter is not available on the connected flight controller"))
362367
na_label.pack(side=tk.TOP, anchor=tk.NW)
363368
ne_label = ttk.Label(legend_right, text=_("Not editable"), font=font)
369+
show_tooltip(
370+
ne_label,
371+
_(
372+
"This value has been automatically calculated by the software using data\n"
373+
"from the component editor window or from the 'configuration_steps.json' file"
374+
),
375+
)
364376
ne_label.configure(state="disabled")
365377
ne_label.pack(side=tk.TOP, anchor=tk.NW)
366378
legend_frame.pack(side=tk.LEFT, fill="x", expand=False, padx=(2, 2))

0 commit comments

Comments
 (0)