diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c index a95d0e3ea88..d4417275af1 100644 --- a/source/blender/editors/space_clip/clip_buttons.c +++ b/source/blender/editors/space_clip/clip_buttons.c @@ -462,6 +462,9 @@ void uiTemplateMarker(uiLayout *layout, cb->marker_flag = marker->flag; cb->framenr = user->framenr; + uiLayoutSetPropSep(layout, true); + uiLayoutSetPropDecorate(layout, false); + if (compact) { block = uiLayoutGetBlock(layout); @@ -479,7 +482,7 @@ void uiTemplateMarker(uiLayout *layout, ICON_HIDE_OFF, 0, 0, - UI_UNIT_X, + 0, UI_UNIT_Y, &cb->marker_flag, 0, @@ -499,14 +502,14 @@ void uiTemplateMarker(uiLayout *layout, if (track->flag & TRACK_LOCKED) { uiLayoutSetActive(layout, false); - block = uiLayoutAbsoluteBlock(layout); + block = uiLayoutGetBlock(layout); uiDefBut(block, UI_BTYPE_LABEL, 0, IFACE_("Track is locked"), 0, 0, - UI_UNIT_X * 15.0f, + 0, UI_UNIT_Y, NULL, 0, @@ -537,7 +540,8 @@ void uiTemplateMarker(uiLayout *layout, cb->marker_flag = marker->flag; - block = uiLayoutAbsoluteBlock(layout); + 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); @@ -553,9 +557,9 @@ void uiTemplateMarker(uiLayout *layout, MARKER_DISABLED, B_MARKER_FLAG, IFACE_("Enabled"), - 0.5 * UI_UNIT_X, - 9.5 * UI_UNIT_Y, - 7.25 * UI_UNIT_X, + 0, + 0, + 0, UI_UNIT_Y, &cb->marker_flag, 0, @@ -566,31 +570,14 @@ 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:"), - 0.5 * UI_UNIT_X, - 9 * UI_UNIT_Y, - 7.25 * UI_UNIT_X, + IFACE_("Position X"), + 0, + 0, + 0, UI_UNIT_Y, &cb->marker_pos[0], -10 * width, @@ -603,10 +590,10 @@ void uiTemplateMarker(uiLayout *layout, bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_POS, - IFACE_("Y:"), - 8.25 * UI_UNIT_X, - 9 * UI_UNIT_Y, - 7.25 * UI_UNIT_X, + IFACE_("Y"), + 0, + 0, + 0, UI_UNIT_Y, &cb->marker_pos[1], -10 * height, @@ -617,27 +604,16 @@ 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:"), - 0.5 * UI_UNIT_X, - 7 * UI_UNIT_Y, - 7.25 * UI_UNIT_X, + IFACE_("Offset X"), + 0, + 0, + 0, UI_UNIT_Y, &cb->track_offset[0], -10 * width, @@ -650,10 +626,10 @@ void uiTemplateMarker(uiLayout *layout, bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_OFFSET, - IFACE_("Y:"), - 8.25 * UI_UNIT_X, - 7 * UI_UNIT_Y, - 7.25 * UI_UNIT_X, + IFACE_("Y"), + 0, + 0, + 0, UI_UNIT_Y, &cb->track_offset[1], -10 * height, @@ -664,27 +640,16 @@ 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:"), - 0.5 * UI_UNIT_X, - 5 * UI_UNIT_Y, - 15 * UI_UNIT_X, + IFACE_("Pattern Width"), + 0, + 0, + 0, UI_UNIT_Y, &cb->marker_pat[0], 3.0f, @@ -697,10 +662,10 @@ void uiTemplateMarker(uiLayout *layout, bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_PAT_DIM, - IFACE_("Height:"), - 0.5 * UI_UNIT_X, - 4 * UI_UNIT_Y, - 15 * UI_UNIT_X, + IFACE_("Height"), + 0, + 0, + 0, UI_UNIT_Y, &cb->marker_pat[1], 3.0f, @@ -711,27 +676,16 @@ 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:"), - 0.5 * UI_UNIT_X, - 2 * UI_UNIT_Y, - 7.25 * UI_UNIT_X, + IFACE_("Search Position X"), + 0, + 0, + 0, UI_UNIT_Y, &cb->marker_search_pos[0], -width, @@ -744,10 +698,10 @@ void uiTemplateMarker(uiLayout *layout, bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_SEARCH_POS, - IFACE_("Y:"), - 8.25 * UI_UNIT_X, - 2 * UI_UNIT_Y, - 7.25 * UI_UNIT_X, + IFACE_("Y"), + 0, + 0, + 0, UI_UNIT_Y, &cb->marker_search_pos[1], -height, @@ -757,13 +711,17 @@ 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:"), - 0.5 * UI_UNIT_X, - 1 * UI_UNIT_Y, - 15 * UI_UNIT_X, + IFACE_("Search Width"), + 0, + 0, + 0, UI_UNIT_Y, &cb->marker_search[0], 3.0f, @@ -776,10 +734,10 @@ void uiTemplateMarker(uiLayout *layout, bt = uiDefButF(block, UI_BTYPE_NUM, B_MARKER_SEARCH_DIM, - IFACE_("Height:"), - 0.5 * UI_UNIT_X, - 0 * UI_UNIT_Y, - 15 * UI_UNIT_X, + IFACE_("Height"), + 0, + 0, + 0, UI_UNIT_Y, &cb->marker_search[1], 3.0f, @@ -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); } }