Cleanup: UI: Remove unused min/max arguments to uiDefIconTextBut
These min and max arguments are unused, 0 is passed everywhere.
This commit is contained in:
@@ -745,51 +745,18 @@ static uiBlock *wm_block_insert_unicode_create(bContext *C, ARegion *region, voi
|
||||
split->column(false);
|
||||
|
||||
if (windows_layout) {
|
||||
confirm = uiDefIconTextBut(block,
|
||||
ButType::But,
|
||||
0,
|
||||
0,
|
||||
IFACE_("Insert"),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
confirm = uiDefIconTextBut(
|
||||
block, ButType::But, 0, 0, IFACE_("Insert"), 0, 0, 0, UI_UNIT_Y, nullptr, std::nullopt);
|
||||
split->column(false);
|
||||
}
|
||||
|
||||
cancel = uiDefIconTextBut(block,
|
||||
ButType::But,
|
||||
0,
|
||||
0,
|
||||
IFACE_("Cancel"),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
cancel = uiDefIconTextBut(
|
||||
block, ButType::But, 0, 0, IFACE_("Cancel"), 0, 0, 0, UI_UNIT_Y, nullptr, std::nullopt);
|
||||
|
||||
if (!windows_layout) {
|
||||
split->column(false);
|
||||
confirm = uiDefIconTextBut(block,
|
||||
ButType::But,
|
||||
0,
|
||||
0,
|
||||
IFACE_("Insert"),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
confirm = uiDefIconTextBut(
|
||||
block, ButType::But, 0, 0, IFACE_("Insert"), 0, 0, 0, UI_UNIT_Y, nullptr, std::nullopt);
|
||||
}
|
||||
|
||||
UI_block_func_set(block, nullptr, nullptr, nullptr);
|
||||
|
||||
@@ -1405,8 +1405,6 @@ uiBut *uiDefIconTextBut(uiBlock *block,
|
||||
short width,
|
||||
short height,
|
||||
void *poin,
|
||||
float min,
|
||||
float max,
|
||||
std::optional<blender::StringRef> tip);
|
||||
uiBut *uiDefIconTextButI(uiBlock *block,
|
||||
ButType type,
|
||||
@@ -1418,8 +1416,6 @@ uiBut *uiDefIconTextButI(uiBlock *block,
|
||||
short width,
|
||||
short height,
|
||||
int *poin,
|
||||
float min,
|
||||
float max,
|
||||
std::optional<blender::StringRef> tip);
|
||||
uiBut *uiDefIconTextButS(uiBlock *block,
|
||||
ButType type,
|
||||
@@ -1431,8 +1427,6 @@ uiBut *uiDefIconTextButS(uiBlock *block,
|
||||
short width,
|
||||
short height,
|
||||
short *poin,
|
||||
float min,
|
||||
float max,
|
||||
std::optional<blender::StringRef> tip);
|
||||
uiBut *uiDefIconTextButR(uiBlock *block,
|
||||
ButType type,
|
||||
@@ -1446,8 +1440,6 @@ uiBut *uiDefIconTextButR(uiBlock *block,
|
||||
PointerRNA *ptr,
|
||||
blender::StringRefNull propname,
|
||||
int index,
|
||||
float min,
|
||||
float max,
|
||||
std::optional<blender::StringRef> tip);
|
||||
uiBut *uiDefIconTextButR_prop(uiBlock *block,
|
||||
ButType type,
|
||||
|
||||
@@ -4691,8 +4691,6 @@ static void ui_def_but_rna__menu(bContext *C, uiLayout *layout, void *but_p)
|
||||
UI_UNIT_X * 5,
|
||||
UI_UNIT_Y,
|
||||
&handle->retvalue,
|
||||
0.0f,
|
||||
0.0,
|
||||
description_static);
|
||||
}
|
||||
else {
|
||||
@@ -5844,12 +5842,10 @@ uiBut *uiDefIconTextBut(uiBlock *block,
|
||||
short width,
|
||||
short height,
|
||||
void *poin,
|
||||
float min,
|
||||
float max,
|
||||
const std::optional<StringRef> tip)
|
||||
{
|
||||
uiBut *but = ui_def_but(
|
||||
block, but_and_ptr_type, retval, str, x, y, width, height, poin, min, max, tip);
|
||||
block, but_and_ptr_type, retval, str, x, y, width, height, poin, 0.0f, 0.0f, tip);
|
||||
ui_but_update_and_icon_set(but, icon);
|
||||
but->drawflag |= UI_BUT_ICON_LEFT;
|
||||
return but;
|
||||
@@ -5864,8 +5860,6 @@ uiBut *uiDefIconTextButI(uiBlock *block,
|
||||
short width,
|
||||
short height,
|
||||
int *poin,
|
||||
float min,
|
||||
float max,
|
||||
const std::optional<StringRef> tip)
|
||||
{
|
||||
return uiDefIconTextBut(block,
|
||||
@@ -5878,8 +5872,6 @@ uiBut *uiDefIconTextButI(uiBlock *block,
|
||||
width,
|
||||
height,
|
||||
(void *)poin,
|
||||
min,
|
||||
max,
|
||||
tip);
|
||||
}
|
||||
uiBut *uiDefIconTextButS(uiBlock *block,
|
||||
@@ -5892,8 +5884,6 @@ uiBut *uiDefIconTextButS(uiBlock *block,
|
||||
short width,
|
||||
short height,
|
||||
short *poin,
|
||||
float min,
|
||||
float max,
|
||||
const std::optional<StringRef> tip)
|
||||
{
|
||||
return uiDefIconTextBut(block,
|
||||
@@ -5906,8 +5896,6 @@ uiBut *uiDefIconTextButS(uiBlock *block,
|
||||
width,
|
||||
height,
|
||||
(void *)poin,
|
||||
min,
|
||||
max,
|
||||
tip);
|
||||
}
|
||||
|
||||
@@ -5923,12 +5911,10 @@ uiBut *uiDefIconTextButR(uiBlock *block,
|
||||
PointerRNA *ptr,
|
||||
blender::StringRefNull propname,
|
||||
int index,
|
||||
float min,
|
||||
float max,
|
||||
const std::optional<StringRef> tip)
|
||||
{
|
||||
uiBut *but = ui_def_but_rna_propname(
|
||||
block, type, retval, str, x, y, width, height, ptr, propname, index, min, max, tip);
|
||||
block, type, retval, str, x, y, width, height, ptr, propname, index, 0.0f, 0.0f, tip);
|
||||
ui_but_update_and_icon_set(but, icon);
|
||||
but->drawflag |= UI_BUT_ICON_LEFT;
|
||||
return but;
|
||||
|
||||
@@ -1084,8 +1084,6 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev
|
||||
w,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
"");
|
||||
item_found = true;
|
||||
UI_but_func_set(but2, [um, umi](bContext &) {
|
||||
@@ -1110,8 +1108,6 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev
|
||||
w,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
TIP_("Add to a user defined context menu (stored in the user preferences)"));
|
||||
UI_but_func_set(but2, [but](bContext &C) {
|
||||
bUserMenu *um = ED_screen_user_menu_ensure(&C);
|
||||
@@ -1161,8 +1157,6 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev
|
||||
w,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
"");
|
||||
UI_but_func_set(but2, [but](bContext &C) {
|
||||
UI_popup_block_invoke(&C, menu_change_shortcut, but, nullptr);
|
||||
@@ -1179,8 +1173,6 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev
|
||||
w,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
TIP_("Only keyboard shortcuts can be edited that way, "
|
||||
"please use User Preferences otherwise"));
|
||||
UI_but_flag_enable(but2, UI_BUT_DISABLED);
|
||||
@@ -1197,8 +1189,6 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev
|
||||
w,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
"");
|
||||
UI_but_func_set(but2, [but](bContext &C) { remove_shortcut_func(&C, but); });
|
||||
}
|
||||
@@ -1215,8 +1205,6 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev
|
||||
w,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
"");
|
||||
UI_but_func_set(but2, [but](bContext &C) {
|
||||
UI_popup_block_ex(&C, menu_add_shortcut, nullptr, menu_add_shortcut_cancel, but, nullptr);
|
||||
|
||||
@@ -2991,8 +2991,7 @@ static uiBut *uiItem_simple(uiLayout *layout,
|
||||
const int w = ui_text_icon_width_ex(layout, name, icon, ui_text_pad_none, UI_FSTYLE_WIDGET);
|
||||
uiBut *but;
|
||||
if (icon && !name.is_empty()) {
|
||||
but = uiDefIconTextBut(
|
||||
block, but_type, 0, icon, name, 0, 0, w, UI_UNIT_Y, nullptr, 0.0, 0.0, tooltip);
|
||||
but = uiDefIconTextBut(block, but_type, 0, icon, name, 0, 0, w, UI_UNIT_Y, nullptr, tooltip);
|
||||
}
|
||||
else if (icon) {
|
||||
but = uiDefIconBut(block, but_type, 0, icon, 0, 0, w, UI_UNIT_Y, nullptr, 0.0, 0.0, tooltip);
|
||||
@@ -4675,8 +4674,7 @@ PanelLayout uiLayout::panel_prop(const bContext *C,
|
||||
uiBlock *block = row->block();
|
||||
const int icon = is_open ? ICON_DOWNARROW_HLT : ICON_RIGHTARROW;
|
||||
const int width = ui_text_icon_width(this, "", icon, false);
|
||||
uiDefIconTextBut(
|
||||
block, ButType::Label, 0, icon, "", 0, 0, width, UI_UNIT_Y, nullptr, 0.0f, 0.0f, "");
|
||||
uiDefIconTextBut(block, ButType::Label, 0, icon, "", 0, 0, width, UI_UNIT_Y, nullptr, "");
|
||||
|
||||
panel_layout.header = row;
|
||||
}
|
||||
|
||||
@@ -153,19 +153,8 @@ uiPieMenu *UI_pie_menu_begin(bContext *C, const char *title, int icon, const wmE
|
||||
if (icon) {
|
||||
SNPRINTF_UTF8(titlestr, " %s", title);
|
||||
w = ui_pie_menu_title_width(titlestr, icon);
|
||||
but = uiDefIconTextBut(pie->pie_block,
|
||||
ButType::Label,
|
||||
0,
|
||||
icon,
|
||||
titlestr,
|
||||
0,
|
||||
0,
|
||||
w,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
but = uiDefIconTextBut(
|
||||
pie->pie_block, ButType::Label, 0, icon, titlestr, 0, 0, w, UI_UNIT_Y, nullptr, "");
|
||||
}
|
||||
else {
|
||||
w = ui_pie_menu_title_width(title, 0);
|
||||
@@ -330,8 +319,6 @@ void ui_pie_menu_level_create(uiBlock *block,
|
||||
UI_UNIT_X * 3,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0f,
|
||||
0.0f,
|
||||
"Show more items of this menu");
|
||||
UI_but_funcN_set(but, ui_pie_menu_level_invoke, remaining, &lvl);
|
||||
}
|
||||
|
||||
@@ -461,8 +461,7 @@ static void create_title_button(uiLayout *layout, const char *title, int icon)
|
||||
|
||||
if (icon) {
|
||||
SNPRINTF_UTF8(titlestr, " %s", title);
|
||||
uiDefIconTextBut(
|
||||
block, ButType::Label, 0, icon, titlestr, 0, 0, 200, UI_UNIT_Y, nullptr, 0.0, 0.0, "");
|
||||
uiDefIconTextBut(block, ButType::Label, 0, icon, titlestr, 0, 0, 200, UI_UNIT_Y, nullptr, "");
|
||||
}
|
||||
else {
|
||||
uiBut *but = uiDefBut(
|
||||
@@ -843,8 +842,6 @@ void UI_popup_block_template_confirm_op(uiLayout *layout,
|
||||
UI_UNIT_X, /* Ignored, as a split is used. */
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
|
||||
return but;
|
||||
|
||||
@@ -100,8 +100,6 @@ static uiBlock *colorband_tools_fn(bContext *C, ARegion *region, void *cb_v)
|
||||
menuwidth,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
UI_but_func_set(but, [coba, cb](bContext &C) {
|
||||
colorband_flip(&C, coba);
|
||||
@@ -120,8 +118,6 @@ static uiBlock *colorband_tools_fn(bContext *C, ARegion *region, void *cb_v)
|
||||
menuwidth,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
UI_but_func_set(but, [coba, cb](bContext &C) {
|
||||
colorband_distribute(&C, coba, false);
|
||||
@@ -140,8 +136,6 @@ static uiBlock *colorband_tools_fn(bContext *C, ARegion *region, void *cb_v)
|
||||
menuwidth,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
UI_but_func_set(but, [coba, cb](bContext &C) {
|
||||
colorband_distribute(&C, coba, true);
|
||||
@@ -167,8 +161,6 @@ static uiBlock *colorband_tools_fn(bContext *C, ARegion *region, void *cb_v)
|
||||
menuwidth,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
UI_but_func_set(but, [coba, cb](bContext &C) {
|
||||
BKE_colorband_init(coba, true);
|
||||
@@ -244,8 +236,6 @@ static void colorband_buttons_layout(uiLayout *layout,
|
||||
2.0f * unit,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
TIP_("Add a new color stop to the color ramp"));
|
||||
UI_but_func_set(bt, [coba, cb](bContext &C) { colorband_add(C, cb, *coba); });
|
||||
|
||||
@@ -259,8 +249,6 @@ static void colorband_buttons_layout(uiLayout *layout,
|
||||
2.0f * unit,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
TIP_("Delete the active position"));
|
||||
UI_but_func_set(bt, [coba, cb](bContext &C) {
|
||||
if (BKE_colorband_element_remove(coba, coba->cur)) {
|
||||
|
||||
@@ -210,8 +210,6 @@ static uiBlock *curvemap_tools_func(
|
||||
menuwidth,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
UI_but_func_set(but, [cumap](bContext &C) {
|
||||
BKE_curvemapping_reset_view(cumap);
|
||||
@@ -231,8 +229,6 @@ static uiBlock *curvemap_tools_func(
|
||||
menuwidth,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
UI_but_func_set(but, [cumap, cb](bContext &C) {
|
||||
cumap->flag &= ~CUMA_EXTEND_EXTRAPOLATE;
|
||||
@@ -253,8 +249,6 @@ static uiBlock *curvemap_tools_func(
|
||||
menuwidth,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
UI_but_func_set(but, [cumap, cb](bContext &C) {
|
||||
cumap->flag |= CUMA_EXTEND_EXTRAPOLATE;
|
||||
@@ -277,8 +271,6 @@ static uiBlock *curvemap_tools_func(
|
||||
menuwidth,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
UI_but_func_set(but, [cumap, cb, reset_mode](bContext &C) {
|
||||
CurveMap *cuma = cumap->cm + cumap->cur;
|
||||
|
||||
@@ -58,8 +58,6 @@ static uiBlock *curve_profile_presets_fn(bContext *C, ARegion *region, void *cb_
|
||||
0,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
const eCurveProfilePresets preset = item.second;
|
||||
UI_but_func_set(but, [profile, cb, preset](bContext &C) {
|
||||
@@ -98,8 +96,6 @@ static uiBlock *curve_profile_tools_fn(bContext *C, ARegion *region, void *cb_v)
|
||||
0,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
UI_but_func_set(but, [profile](bContext &C) {
|
||||
BKE_curveprofile_reset_view(profile);
|
||||
@@ -117,8 +113,6 @@ static uiBlock *curve_profile_tools_fn(bContext *C, ARegion *region, void *cb_v)
|
||||
0,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
UI_but_func_set(but, [profile, cb](bContext &C) {
|
||||
BKE_curveprofile_reset(profile);
|
||||
@@ -250,8 +244,6 @@ static void CurveProfile_buttons_layout(uiLayout *layout, PointerRNA *ptr, const
|
||||
UI_UNIT_X,
|
||||
UI_UNIT_X,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
TIP_("Reapply and update the preset, removing changes"));
|
||||
UI_but_func_set(bt, [profile, cb](bContext &C) {
|
||||
BKE_curveprofile_reset(profile);
|
||||
|
||||
@@ -996,7 +996,7 @@ static uiBut *template_id_def_new_but(uiBlock *block,
|
||||
}
|
||||
else {
|
||||
but = uiDefIconTextBut(
|
||||
block, but_type, 0, icon, button_text, 0, 0, w, but_height, nullptr, 0, 0, std::nullopt);
|
||||
block, but_type, 0, icon, button_text, 0, 0, w, but_height, nullptr, std::nullopt);
|
||||
UI_but_funcN_set(but,
|
||||
template_id_cb,
|
||||
MEM_new<TemplateID>(__func__, template_ui),
|
||||
@@ -1327,8 +1327,6 @@ static void template_ID(const bContext *C,
|
||||
w,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
UI_but_funcN_set(but,
|
||||
template_id_cb,
|
||||
|
||||
@@ -169,8 +169,6 @@ static eAutoPropButsReturn template_operator_property_buts_draw_single(
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
TIP_("Reset operator defaults"));
|
||||
UI_but_func_set(but, ui_layout_operator_buts__reset_cb, op, nullptr);
|
||||
}
|
||||
|
||||
@@ -261,8 +261,6 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
|
||||
textwidth + UI_UNIT_X * 1.5f,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0f,
|
||||
0.0f,
|
||||
"");
|
||||
|
||||
/* stick progress bar and cancel button together */
|
||||
@@ -285,8 +283,6 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
|
||||
UI_UNIT_X * 6.0f,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0f,
|
||||
0.0f,
|
||||
nullptr);
|
||||
|
||||
but_progress->progress_factor = progress;
|
||||
@@ -304,8 +300,6 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
|
||||
UI_UNIT_X,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0f,
|
||||
0.0f,
|
||||
TIP_("Stop this job"));
|
||||
}
|
||||
}
|
||||
@@ -321,8 +315,6 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
|
||||
UI_UNIT_X * 5.0f,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0f,
|
||||
0.0f,
|
||||
TIP_("Stop animation playback"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -516,19 +516,8 @@ static void template_texture_user_menu(bContext *C, uiLayout *layout, void * /*a
|
||||
SNPRINTF_UTF8(name, " %s", user->name);
|
||||
}
|
||||
|
||||
but = uiDefIconTextBut(block,
|
||||
ButType::But,
|
||||
0,
|
||||
user->icon,
|
||||
name,
|
||||
0,
|
||||
0,
|
||||
UI_UNIT_X * 4,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
"");
|
||||
but = uiDefIconTextBut(
|
||||
block, ButType::But, 0, user->icon, name, 0, 0, UI_UNIT_X * 4, UI_UNIT_Y, nullptr, "");
|
||||
UI_but_funcN_set(but,
|
||||
template_texture_select,
|
||||
MEM_new<ButsTextureUser>("ButsTextureUser", *user),
|
||||
|
||||
@@ -1110,8 +1110,6 @@ static void graph_draw_driver_settings_panel(uiLayout *layout,
|
||||
10 * UI_UNIT_X,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
TIP_("Add a Driver Variable to keep track of an input used by the driver"));
|
||||
UI_but_func_set(but, driver_add_var_cb, driver, nullptr);
|
||||
|
||||
@@ -1272,8 +1270,6 @@ static void graph_draw_driver_settings_panel(uiLayout *layout,
|
||||
10 * UI_UNIT_X,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
TIP_("Force updates of dependencies - Only use this if drivers are not updating correctly"));
|
||||
UI_but_func_set(but, driver_update_flags_cb, fcu, nullptr);
|
||||
}
|
||||
|
||||
@@ -111,8 +111,6 @@ static void ui_imageuser_slot_menu(bContext *C, uiLayout *layout, void *image_p)
|
||||
UI_UNIT_X * 5,
|
||||
UI_UNIT_X,
|
||||
&image->render_slot,
|
||||
0.0f,
|
||||
0.0,
|
||||
"");
|
||||
}
|
||||
|
||||
|
||||
@@ -244,8 +244,6 @@ void node_geometry_add_attribute_search_button(const bContext & /*C*/,
|
||||
&socket_ptr,
|
||||
"default_value",
|
||||
0,
|
||||
0.0f,
|
||||
0.0f,
|
||||
"");
|
||||
UI_but_placeholder_set(but, placeholder);
|
||||
|
||||
|
||||
@@ -195,8 +195,6 @@ void node_geometry_add_layer_search_button(const bContext & /*C*/,
|
||||
&socket_ptr,
|
||||
"default_value",
|
||||
0,
|
||||
0.0f,
|
||||
0.0f,
|
||||
"");
|
||||
UI_but_placeholder_set(but, placeholder);
|
||||
|
||||
|
||||
@@ -584,8 +584,6 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname)
|
||||
UI_UNIT_X * 4,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0.0,
|
||||
0.0,
|
||||
TIP_("Add node to input"));
|
||||
|
||||
argN = (NodeLinkArg *)MEM_dupallocN(arg);
|
||||
|
||||
@@ -54,8 +54,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
||||
params.width,
|
||||
params.height,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
UI_but_func_tooltip_set(
|
||||
but,
|
||||
@@ -83,8 +81,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
||||
params.width,
|
||||
params.height,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
/* Right-align indices. */
|
||||
UI_but_drawflag_enable(but, UI_BUT_TEXT_RIGHT);
|
||||
@@ -114,8 +110,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
||||
params.width,
|
||||
params.height,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
UI_but_func_tooltip_set(
|
||||
but,
|
||||
@@ -141,8 +135,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
||||
params.width,
|
||||
params.height,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
/* Right-align Integers. */
|
||||
UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
|
||||
@@ -171,8 +163,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
||||
params.width,
|
||||
params.height,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
UI_but_func_tooltip_set(
|
||||
but,
|
||||
@@ -198,8 +188,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
||||
params.width,
|
||||
params.height,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
UI_but_drawflag_disable(but, UI_BUT_ICON_LEFT);
|
||||
}
|
||||
@@ -240,8 +228,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
||||
params.width,
|
||||
params.height,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
}
|
||||
else if (data.type().is<std::string>()) {
|
||||
@@ -255,8 +241,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
||||
params.width,
|
||||
params.height,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
}
|
||||
else if (data.type().is<MStringProperty>()) {
|
||||
@@ -272,8 +256,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
||||
params.width,
|
||||
params.height,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
|
||||
UI_but_func_tooltip_set(
|
||||
@@ -306,8 +288,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
||||
segment_width,
|
||||
params.height,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
|
||||
UI_but_func_tooltip_set(
|
||||
@@ -342,8 +322,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
||||
segment_width,
|
||||
params.height,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
UI_but_func_tooltip_set(
|
||||
but,
|
||||
@@ -378,8 +356,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
||||
segment_width,
|
||||
params.height,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
/* Right-align Floats. */
|
||||
UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
|
||||
@@ -414,8 +390,6 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
||||
params.width,
|
||||
params.height,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
std::nullopt);
|
||||
/* Center alignment. */
|
||||
UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
|
||||
|
||||
@@ -249,8 +249,6 @@ static void add_layer_name_search_button(DrawGroupInputsContext &ctx,
|
||||
ctx.properties_ptr,
|
||||
rna_path,
|
||||
0,
|
||||
0.0f,
|
||||
0.0f,
|
||||
StringRef(socket.description));
|
||||
UI_but_placeholder_set(but, "Layer");
|
||||
layout->label("", ICON_BLANK1);
|
||||
@@ -369,8 +367,6 @@ static void add_attribute_search_button(DrawGroupInputsContext &ctx,
|
||||
ctx.properties_ptr,
|
||||
rna_path_attribute_name,
|
||||
0,
|
||||
0.0f,
|
||||
0.0f,
|
||||
StringRef(socket.description));
|
||||
|
||||
const Object *object = ed::object::context_object(&ctx.C);
|
||||
|
||||
@@ -4170,8 +4170,6 @@ static uiBlock *block_create_autorun_warning(bContext *C, ARegion *region, void
|
||||
50,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
TIP_("Reload file with execution of Python scripts enabled"));
|
||||
UI_but_func_set(
|
||||
but, [block](bContext &C) { wm_block_autorun_warning_reload_with_scripts(&C, block); });
|
||||
@@ -4187,8 +4185,6 @@ static uiBlock *block_create_autorun_warning(bContext *C, ARegion *region, void
|
||||
50,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
TIP_("Enable scripts"));
|
||||
UI_but_func_set(but,
|
||||
[block](bContext &C) { wm_block_autorun_warning_enable_scripts(&C, block); });
|
||||
@@ -4206,8 +4202,6 @@ static uiBlock *block_create_autorun_warning(bContext *C, ARegion *region, void
|
||||
50,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
TIP_("Continue using file without Python scripts"));
|
||||
UI_but_func_set(but, wm_block_autorun_warning_ignore, block, nullptr);
|
||||
UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
|
||||
@@ -4368,7 +4362,7 @@ static void save_file_overwrite_cancel(bContext *C, void *arg_block, void * /*ar
|
||||
static void save_file_overwrite_cancel_button(uiBlock *block, wmGenericCallback *post_action)
|
||||
{
|
||||
uiBut *but = uiDefIconTextBut(
|
||||
block, ButType::But, 0, ICON_NONE, IFACE_("Cancel"), 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, "");
|
||||
block, ButType::But, 0, ICON_NONE, IFACE_("Cancel"), 0, 0, 0, UI_UNIT_Y, nullptr, "");
|
||||
UI_but_func_set(but, save_file_overwrite_cancel, block, post_action);
|
||||
UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
|
||||
}
|
||||
@@ -4402,19 +4396,8 @@ static void save_file_overwrite_confirm(bContext *C, void *arg_block, void *arg_
|
||||
|
||||
static void save_file_overwrite_confirm_button(uiBlock *block, wmGenericCallback *post_action)
|
||||
{
|
||||
uiBut *but = uiDefIconTextBut(block,
|
||||
ButType::But,
|
||||
0,
|
||||
ICON_NONE,
|
||||
IFACE_("Overwrite"),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
"");
|
||||
uiBut *but = uiDefIconTextBut(
|
||||
block, ButType::But, 0, ICON_NONE, IFACE_("Overwrite"), 0, 0, 0, UI_UNIT_Y, nullptr, "");
|
||||
UI_but_func_set(but, save_file_overwrite_confirm, block, post_action);
|
||||
UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
|
||||
UI_but_flag_enable(but, UI_BUT_REDALERT);
|
||||
@@ -4431,19 +4414,8 @@ static void save_file_overwrite_saveas(bContext *C, void *arg_block, void * /*ar
|
||||
|
||||
static void save_file_overwrite_saveas_button(uiBlock *block, wmGenericCallback *post_action)
|
||||
{
|
||||
uiBut *but = uiDefIconTextBut(block,
|
||||
ButType::But,
|
||||
0,
|
||||
ICON_NONE,
|
||||
IFACE_("Save As..."),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
"");
|
||||
uiBut *but = uiDefIconTextBut(
|
||||
block, ButType::But, 0, ICON_NONE, IFACE_("Save As..."), 0, 0, 0, UI_UNIT_Y, nullptr, "");
|
||||
UI_but_func_set(but, save_file_overwrite_saveas, block, post_action);
|
||||
UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
|
||||
UI_but_flag_enable(but, UI_BUT_ACTIVE_DEFAULT);
|
||||
@@ -4638,26 +4610,15 @@ static void wm_block_file_close_save(bContext *C, void *arg_block, void *arg_dat
|
||||
static void wm_block_file_close_cancel_button(uiBlock *block, wmGenericCallback *post_action)
|
||||
{
|
||||
uiBut *but = uiDefIconTextBut(
|
||||
block, ButType::But, 0, ICON_NONE, IFACE_("Cancel"), 0, 0, 0, UI_UNIT_Y, nullptr, 0, 0, "");
|
||||
block, ButType::But, 0, ICON_NONE, IFACE_("Cancel"), 0, 0, 0, UI_UNIT_Y, nullptr, "");
|
||||
UI_but_func_set(but, wm_block_file_close_cancel, block, post_action);
|
||||
UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
|
||||
}
|
||||
|
||||
static void wm_block_file_close_discard_button(uiBlock *block, wmGenericCallback *post_action)
|
||||
{
|
||||
uiBut *but = uiDefIconTextBut(block,
|
||||
ButType::But,
|
||||
0,
|
||||
ICON_NONE,
|
||||
IFACE_("Don't Save"),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
"");
|
||||
uiBut *but = uiDefIconTextBut(
|
||||
block, ButType::But, 0, ICON_NONE, IFACE_("Don't Save"), 0, 0, 0, UI_UNIT_Y, nullptr, "");
|
||||
UI_but_func_set(but, wm_block_file_close_discard, block, post_action);
|
||||
UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
|
||||
}
|
||||
@@ -4678,8 +4639,6 @@ static void wm_block_file_close_save_button(uiBlock *block,
|
||||
0,
|
||||
UI_UNIT_Y,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
"");
|
||||
UI_but_func_set(but, wm_block_file_close_save, block, post_action);
|
||||
UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
|
||||
|
||||
Reference in New Issue
Block a user