UI: add title to assign shortcut popup, tweak padding
Differential Revision: https://developer.blender.org/D5576
This commit is contained in:
committed by
Brecht Van Lommel
parent
ee2bed7947
commit
41b27a4def
@@ -176,11 +176,12 @@ static uiBlock *menu_change_shortcut(bContext *C, ARegion *ar, void *arg)
|
||||
UI_block_flag_enable(block, UI_BLOCK_MOVEMOUSE_QUIT);
|
||||
UI_block_direction_set(block, UI_DIR_CENTER_Y);
|
||||
|
||||
layout = UI_block_layout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 200, 20, 0, style);
|
||||
layout = UI_block_layout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, U.widget_unit * 10, U.widget_unit * 2, 0, style);
|
||||
|
||||
uiItemL(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Change Shortcut"), ICON_HAND);
|
||||
uiItemR(layout, &ptr, "type", UI_ITEM_R_FULL_EVENT | UI_ITEM_R_IMMEDIATE, "", ICON_NONE);
|
||||
|
||||
UI_block_bounds_set_popup(block, 6, (const int[2]){-50, 26});
|
||||
UI_block_bounds_set_popup(block, 6 * U.dpi_fac, (const int[2]){-100 * U.dpi_fac, 36 * U.dpi_fac});
|
||||
|
||||
shortcut_free_operator_property(prop);
|
||||
|
||||
@@ -227,11 +228,12 @@ static uiBlock *menu_add_shortcut(bContext *C, ARegion *ar, void *arg)
|
||||
UI_block_func_handle_set(block, but_shortcut_name_func, but);
|
||||
UI_block_direction_set(block, UI_DIR_CENTER_Y);
|
||||
|
||||
layout = UI_block_layout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 200, 20, 0, style);
|
||||
layout = UI_block_layout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, U.widget_unit * 10, U.widget_unit * 2, 0, style);
|
||||
|
||||
uiItemL(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Assign Shortcut"), ICON_HAND);
|
||||
uiItemR(layout, &ptr, "type", UI_ITEM_R_FULL_EVENT | UI_ITEM_R_IMMEDIATE, "", ICON_NONE);
|
||||
|
||||
UI_block_bounds_set_popup(block, 6, (const int[2]){-50, 26});
|
||||
UI_block_bounds_set_popup(block, 6 * U.dpi_fac, (const int[2]){-100 * U.dpi_fac, 36 * U.dpi_fac});
|
||||
|
||||
#ifdef USE_KEYMAP_ADD_HACK
|
||||
g_kmi_id_hack = kmi_id;
|
||||
|
||||
Reference in New Issue
Block a user