diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c index a95d0e3ea88..0e480b250a4 100644 --- a/source/blender/editors/space_clip/clip_buttons.c +++ b/source/blender/editors/space_clip/clip_buttons.c @@ -499,7 +499,7 @@ void uiTemplateMarker(uiLayout *layout, if (track->flag & TRACK_LOCKED) { uiLayoutSetActive(layout, false); - block = uiLayoutAbsoluteBlock(layout); + block = uiLayoutGetBlock(layout); uiDefBut(block, UI_BTYPE_LABEL, 0, @@ -537,7 +537,11 @@ void uiTemplateMarker(uiLayout *layout, cb->marker_flag = marker->flag; - block = uiLayoutAbsoluteBlock(layout); + uiLayoutSetPropSep(layout, true); + uiLayoutSetPropDecorate(layout, false); + + col = uiLayoutColumn(layout, true); + block = uiLayoutGetBlock(col); UI_block_func_handle_set(block, marker_block_handler, cb); UI_block_funcN_set(block, marker_update_cb, cb, NULL); @@ -566,28 +570,11 @@ void uiTemplateMarker(uiLayout *layout, col = uiLayoutColumn(layout, true); uiLayoutSetActive(col, (cb->marker_flag & MARKER_DISABLED) == 0); - - block = uiLayoutAbsoluteBlock(col); - UI_block_align_begin(block); - - uiDefBut(block, - UI_BTYPE_LABEL, - 0, - IFACE_("Position:"), - 0, - 10 * UI_UNIT_Y, - 15 * UI_UNIT_X, - UI_UNIT_Y, - NULL, - 0, - 0, - 0, - 0, - ""); + block = uiLayoutGetBlock(col); bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_POS, - IFACE_("X:"), + IFACE_("Position X"), 0.5 * UI_UNIT_X, 9 * UI_UNIT_Y, 7.25 * UI_UNIT_X, @@ -603,7 +590,7 @@ void uiTemplateMarker(uiLayout *layout, bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_POS, - IFACE_("Y:"), + IFACE_("Y"), 8.25 * UI_UNIT_X, 9 * UI_UNIT_Y, 7.25 * UI_UNIT_X, @@ -617,24 +604,13 @@ void uiTemplateMarker(uiLayout *layout, UI_but_number_step_size_set(bt, step); UI_but_number_precision_set(bt, digits); - uiDefBut(block, - UI_BTYPE_LABEL, - 0, - IFACE_("Offset:"), - 0, - 8 * UI_UNIT_Y, - 15 * UI_UNIT_X, - UI_UNIT_Y, - NULL, - 0, - 0, - 0, - 0, - ""); + col = uiLayoutColumn(layout, true); + uiLayoutSetActive(col, (cb->marker_flag & MARKER_DISABLED) == 0); + block = uiLayoutGetBlock(col); bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_OFFSET, - IFACE_("X:"), + IFACE_("Offset X"), 0.5 * UI_UNIT_X, 7 * UI_UNIT_Y, 7.25 * UI_UNIT_X, @@ -650,7 +626,7 @@ void uiTemplateMarker(uiLayout *layout, bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_OFFSET, - IFACE_("Y:"), + IFACE_("Y"), 8.25 * UI_UNIT_X, 7 * UI_UNIT_Y, 7.25 * UI_UNIT_X, @@ -664,24 +640,13 @@ void uiTemplateMarker(uiLayout *layout, UI_but_number_step_size_set(bt, step); UI_but_number_precision_set(bt, digits); - uiDefBut(block, - UI_BTYPE_LABEL, - 0, - IFACE_("Pattern Area:"), - 0, - 6 * UI_UNIT_Y, - 15 * UI_UNIT_X, - UI_UNIT_Y, - NULL, - 0, - 0, - 0, - 0, - ""); + col = uiLayoutColumn(layout, true); + uiLayoutSetActive(col, (cb->marker_flag & MARKER_DISABLED) == 0); + block = uiLayoutGetBlock(col); bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_PAT_DIM, - IFACE_("Width:"), + IFACE_("Pattern Width"), 0.5 * UI_UNIT_X, 5 * UI_UNIT_Y, 15 * UI_UNIT_X, @@ -697,7 +662,7 @@ void uiTemplateMarker(uiLayout *layout, bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_PAT_DIM, - IFACE_("Height:"), + IFACE_("Height"), 0.5 * UI_UNIT_X, 4 * UI_UNIT_Y, 15 * UI_UNIT_X, @@ -711,24 +676,13 @@ void uiTemplateMarker(uiLayout *layout, UI_but_number_step_size_set(bt, step); UI_but_number_precision_set(bt, digits); - uiDefBut(block, - UI_BTYPE_LABEL, - 0, - IFACE_("Search Area:"), - 0, - 3 * UI_UNIT_Y, - 15 * UI_UNIT_X, - UI_UNIT_Y, - NULL, - 0, - 0, - 0, - 0, - ""); + col = uiLayoutColumn(layout, true); + uiLayoutSetActive(col, (cb->marker_flag & MARKER_DISABLED) == 0); + block = uiLayoutGetBlock(col); bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_SEARCH_POS, - IFACE_("X:"), + IFACE_("Search Position X"), 0.5 * UI_UNIT_X, 2 * UI_UNIT_Y, 7.25 * UI_UNIT_X, @@ -744,7 +698,7 @@ void uiTemplateMarker(uiLayout *layout, bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_SEARCH_POS, - IFACE_("Y:"), + IFACE_("Y"), 8.25 * UI_UNIT_X, 2 * UI_UNIT_Y, 7.25 * UI_UNIT_X, @@ -757,10 +711,14 @@ void uiTemplateMarker(uiLayout *layout, TIP_("Y-position of search at frame relative to marker's position")); UI_but_number_step_size_set(bt, step); UI_but_number_precision_set(bt, digits); + + col = uiLayoutColumn(layout, true); + uiLayoutSetActive(col, (cb->marker_flag & MARKER_DISABLED) == 0); + block = uiLayoutGetBlock(col); bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_SEARCH_DIM, - IFACE_("Width:"), + IFACE_("Search Width"), 0.5 * UI_UNIT_X, 1 * UI_UNIT_Y, 15 * UI_UNIT_X, @@ -776,7 +734,7 @@ void uiTemplateMarker(uiLayout *layout, bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_SEARCH_DIM, - IFACE_("Height:"), + IFACE_("Height"), 0.5 * UI_UNIT_X, 0 * UI_UNIT_Y, 15 * UI_UNIT_X, @@ -789,8 +747,6 @@ void uiTemplateMarker(uiLayout *layout, TIP_("Height of marker's search in screen coordinates")); UI_but_number_step_size_set(bt, step); UI_but_number_precision_set(bt, digits); - - UI_block_align_end(block); } }