Skip to content

Commit

Permalink
use align to frame padding in tables' first row
Browse files Browse the repository at this point in the history
  • Loading branch information
aoterodelaroza committed Aug 22, 2024
1 parent 346fac2 commit 59a6f45
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.239
1.2.240
1 change: 1 addition & 0 deletions src/gui/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@ module function representation_menu(s,idcaller) result(changed)
doerase = .false.
call igTableNextRow(ImGuiTableRowFlags_None, 0._c_float)
if (igTableSetColumnIndex(ic_closebutton)) then
call igAlignTextToFramePadding()
str1 = "##2ic_closebutton" // string(ic_closebutton) // "," // string(i) // c_null_char
if (my_CloseButton(c_loc(str1),ColorDangerButton)) doerase = .true.
end if
Expand Down
1 change: 1 addition & 0 deletions src/gui/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ module subroutine draw_tree(w)
! close button
if (sysc(i)%status == sys_init) then
if (igTableSetColumnIndex(ic_closebutton)) then
call igAlignTextToFramePadding()
str = "##1closebutton" // string(ic_closebutton) // "," // string(i) // c_null_char
if (my_CloseButton(c_loc(str),ColorDangerButton)) w%forceremove = (/i/)
if (igIsItemHovered(ImGuiHoveredFlags_None)) &
Expand Down
16 changes: 13 additions & 3 deletions src/gui/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -2124,8 +2124,10 @@ module function draw_editrep_atoms(w,ttshown) result(changed)
suffix = "_" // string(i) // "_" // string(j)

! species
if (igTableSetColumnIndex(ic_sp1)) &
if (igTableSetColumnIndex(ic_sp1)) then
call igAlignTextToFramePadding()
call iw_text(trim(sys(isys)%c%spc(i)%name))
end if
if (igTableSetColumnIndex(ic_sp2)) &
call iw_text(trim(sys(isys)%c%spc(j)%name))

Expand Down Expand Up @@ -2785,6 +2787,7 @@ module subroutine draw_vibrations(w)
! id
if (igTableSetColumnIndex(ic_q_id)) then
! selectable
call igAlignTextToFramePadding()
strl = "##selectq" // string(i) // c_null_char
flags = ImGuiSelectableFlags_SpanAllColumns
flags = ior(flags,ImGuiSelectableFlags_SelectOnNav)
Expand Down Expand Up @@ -2865,6 +2868,7 @@ module subroutine draw_vibrations(w)
! id
if (igTableSetColumnIndex(ic_q_id)) then
! selectable
call igAlignTextToFramePadding()
strl = "##selectf" // string(i) // c_null_char
flags = ImGuiSelectableFlags_SpanAllColumns
flags = ior(flags,ImGuiSelectableFlags_SelectOnNav)
Expand Down Expand Up @@ -3165,7 +3169,10 @@ function atom_selection_widget(c,isys,sty,msty) result(changed)
iz = c%spc(ispc)%z

! id
if (igTableSetColumnIndex(ic_id)) call iw_text(string(i))
if (igTableSetColumnIndex(ic_id)) then
call igAlignTextToFramePadding()
call iw_text(string(i))
end if

! name
if (igTableSetColumnIndex(ic_name)) call iw_text(string(c%spc(ispc)%name))
Expand Down Expand Up @@ -3312,7 +3319,10 @@ function atom_selection_widget(c,isys,sty,msty) result(changed)
call igTableNextRow(ImGuiTableRowFlags_None, 0._c_float)

! id
if (igTableSetColumnIndex(im_id)) call iw_text(string(i))
if (igTableSetColumnIndex(im_id)) then
call igAlignTextToFramePadding()
call iw_text(string(i))
end if

! nat
if (igTableSetColumnIndex(im_nat)) call iw_text(string(c%mol(i)%nat))
Expand Down

0 comments on commit 59a6f45

Please sign in to comment.