Skip to content

Commit 49b26e1

Browse files
committed
regression: fix positioning of text on list/set item widgets in settings editor
1 parent 4f8e5b5 commit 49b26e1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/gazeMapper/GUI/_impl/settings_editor.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,10 +690,8 @@ def draw_list_set_editor(field_lbl: str, val: _T, f_type: typing.Type, documenta
690690
# draw frame
691691
imgui.internal.render_frame(t_bb.min, t_bb.max, clr, True, imgui.get_style().frame_rounding)
692692
# draw text on top (need to go super low-level, as it seems that imgui.internal.render_text_clipped() has some issue on the mac, can't figure it out)
693-
align = imgui.get_style().button_text_align
694-
pos = imgui.ImVec2(tuple((x-y)*a for x,y,a in zip((t_bb.get_width()-2*x_padding,t_bb.get_height()),w_sizes[i],align))) + (t_bb.min.x+x_padding, t_bb.min.y)
695693
imgui.get_current_context().current_window.draw_list.add_text(
696-
imgui.get_current_context().font, 0., pos, imgui.get_color_u32(imgui.Col_.text), val_txt[i], None, 0., t_bb.to_vec4())
694+
imgui.get_current_context().font, 0., (t_bb.min.x+x_padding, t_bb.min.y), imgui.get_color_u32(imgui.Col_.text), val_txt[i], None, 0., t_bb.to_vec4())
697695
if has_order and len(val)>1:
698696
glassesTools.gui.utils.draw_hover_text("Drag to reorder",'')
699697
if imgui.begin_drag_drop_source(imgui.DragDropFlags_.payload_auto_expire):

0 commit comments

Comments
 (0)