Fixed centered not being quite in the center
This commit is contained in:
parent
657e525ff8
commit
8af4468cce
|
@ -24842,11 +24842,11 @@ nk_do_toggle(nk_flags *state,
|
|||
label.x = r.x;
|
||||
label.w = r.w - select.w - style->spacing * 2;
|
||||
} else if (widget_alignment & NK_WIDGET_ALIGN_CENTERED) {
|
||||
select.x = (r.x + r.w) / 2;
|
||||
select.x = r.x + (r.w - select.w) / 2;
|
||||
|
||||
/* label in front of selector */
|
||||
label.x = r.x;
|
||||
label.w = r.w / 2 - select.w - style->spacing * 2;
|
||||
label.w = (r.w - select.w - style->spacing * 2) / 2;
|
||||
} else { /* Default: NK_WIDGET_ALIGN_LEFT */
|
||||
select.x = r.x;
|
||||
|
||||
|
|
|
@ -146,11 +146,11 @@ nk_do_toggle(nk_flags *state,
|
|||
label.x = r.x;
|
||||
label.w = r.w - select.w - style->spacing * 2;
|
||||
} else if (widget_alignment & NK_WIDGET_ALIGN_CENTERED) {
|
||||
select.x = (r.x + r.w) / 2;
|
||||
select.x = r.x + (r.w - select.w) / 2;
|
||||
|
||||
/* label in front of selector */
|
||||
label.x = r.x;
|
||||
label.w = r.w / 2 - select.w - style->spacing * 2;
|
||||
label.w = (r.w - select.w - style->spacing * 2) / 2;
|
||||
} else { /* Default: NK_WIDGET_ALIGN_LEFT */
|
||||
select.x = r.x;
|
||||
|
||||
|
|
Loading…
Reference in New Issue