All drop-down buttons should use the same width
authorraa <roaoao@gmail.com>
Wed, 1 Mar 2017 16:30:18 +0000 (19:30 +0300)
committerraa <roaoao@gmail.com>
Wed, 1 Mar 2017 16:30:18 +0000 (19:30 +0300)
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_templates.c

index aa39870d7559b6f0b365cca0657582a6f6cb8547..ad5f6279606b7ce1e4d53c5eb9d19dcd2bf89b5c 100644 (file)
@@ -1274,7 +1274,7 @@ static void ui_item_rna_size(
        if (!w) {
                if (type == PROP_ENUM && icon_only) {
                        w = ui_text_icon_width(layout, "", ICON_BLANK1, 0);
-                       w += 0.6f * UI_UNIT_X;
+                       w += 0.5f * UI_UNIT_X;
                }
                else {
                        w = ui_text_icon_width(layout, name, icon, 0);
index 131584dd405d3f59697e45bfdaf402dcf2cb3804..62f12cd7967d7e8e0fabbece580cb377a66b5aa6 100644 (file)
@@ -430,7 +430,7 @@ static void template_ID(
                uiLayoutRow(layout, true);
        }
        else if (flag & UI_ID_BROWSE) {
-               but = uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X * 1.6, UI_UNIT_Y,
+               but = uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X * 1.5, UI_UNIT_Y,
                                     TIP_(template_id_browse_tip(type)));
                ui_def_but_icon(but, RNA_struct_ui_icon(type), UI_HAS_ICON);
                /* default dragging of icon for id browse buttons */