UI: make sidebars in 3D view and other editors a little wider and consistent
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 15 May 2019 14:17:23 +0000 (16:17 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 15 May 2019 14:17:23 +0000 (16:17 +0200)
source/blender/editors/include/UI_interface.h
source/blender/editors/space_action/space_action.c
source/blender/editors/space_graph/space_graph.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_nla/space_nla.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_sequencer/space_sequencer.c
source/blender/editors/space_view3d/space_view3d.c

index c24b555..14d681e 100644 (file)
@@ -228,6 +228,7 @@ enum {
 
 #define UI_PANEL_WIDTH 340
 #define UI_COMPACT_PANEL_WIDTH 160
+#define UI_SIDEBAR_PANEL_WIDTH 220
 #define UI_NAVIGATION_REGION_WIDTH UI_COMPACT_PANEL_WIDTH
 #define UI_NARROW_NAVIGATION_REGION_WIDTH 100
 
index ad4346d..972f19b 100644 (file)
@@ -45,9 +45,9 @@
 #include "WM_types.h"
 #include "WM_message.h"
 
+#include "UI_interface.h"
 #include "UI_resources.h"
 #include "UI_view2d.h"
-#include "UI_interface.h"
 
 #include "ED_space_api.h"
 #include "ED_screen.h"
@@ -899,7 +899,7 @@ void ED_spacetype_action(void)
   /* regions: UI buttons */
   art = MEM_callocN(sizeof(ARegionType), "spacetype action region");
   art->regionid = RGN_TYPE_UI;
-  art->prefsizex = 200;
+  art->prefsizex = UI_SIDEBAR_PANEL_WIDTH;
   art->keymapflag = ED_KEYMAP_UI;
   art->listener = action_region_listener;
   art->init = action_buttons_area_init;
index 4c675b6..4e131c6 100644 (file)
@@ -891,7 +891,7 @@ void ED_spacetype_ipo(void)
   /* regions: UI buttons */
   art = MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
   art->regionid = RGN_TYPE_UI;
-  art->prefsizex = 200;
+  art->prefsizex = UI_SIDEBAR_PANEL_WIDTH;
   art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES;
   art->listener = graph_region_listener;
   art->init = graph_buttons_region_init;
index 00f0758..cbe655f 100644 (file)
@@ -1033,7 +1033,7 @@ void ED_spacetype_image(void)
   /* regions: listview/buttons/scopes */
   art = MEM_callocN(sizeof(ARegionType), "spacetype image region");
   art->regionid = RGN_TYPE_UI;
-  art->prefsizex = 220;  // XXX
+  art->prefsizex = UI_SIDEBAR_PANEL_WIDTH;
   art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES;
   art->listener = image_buttons_region_listener;
   art->message_subscribe = ED_area_do_mgs_subscribe_for_tool_ui;
index 7243edf..4b7dfe5 100644 (file)
@@ -48,6 +48,7 @@
 
 #include "RNA_access.h"
 
+#include "UI_interface.h"
 #include "UI_resources.h"
 #include "UI_view2d.h"
 
@@ -642,7 +643,7 @@ void ED_spacetype_nla(void)
   /* regions: UI buttons */
   art = MEM_callocN(sizeof(ARegionType), "spacetype nla region");
   art->regionid = RGN_TYPE_UI;
-  art->prefsizex = 200;
+  art->prefsizex = UI_SIDEBAR_PANEL_WIDTH;
   art->keymapflag = ED_KEYMAP_UI;
   art->listener = nla_region_listener;
   art->init = nla_buttons_region_init;
index 2152bb9..2351d43 100644 (file)
@@ -998,7 +998,7 @@ void ED_spacetype_node(void)
   /* regions: listview/buttons */
   art = MEM_callocN(sizeof(ARegionType), "spacetype node region");
   art->regionid = RGN_TYPE_UI;
-  art->prefsizex = 180;  // XXX
+  art->prefsizex = UI_SIDEBAR_PANEL_WIDTH;
   art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES;
   art->listener = node_region_listener;
   art->init = node_buttons_region_init;
index febcc05..7a02b18 100644 (file)
@@ -832,7 +832,7 @@ void ED_spacetype_sequencer(void)
   /* regions: listview/buttons */
   art = MEM_callocN(sizeof(ARegionType), "spacetype sequencer region");
   art->regionid = RGN_TYPE_UI;
-  art->prefsizex = 220;  // XXX
+  art->prefsizex = UI_SIDEBAR_PANEL_WIDTH;
   art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES;
   art->listener = sequencer_buttons_region_listener;
   art->init = sequencer_buttons_region_init;
index e7d2642..c189186 100644 (file)
@@ -1607,7 +1607,7 @@ void ED_spacetype_view3d(void)
   /* regions: listview/buttons */
   art = MEM_callocN(sizeof(ARegionType), "spacetype view3d buttons region");
   art->regionid = RGN_TYPE_UI;
-  art->prefsizex = 180; /* XXX */
+  art->prefsizex = UI_SIDEBAR_PANEL_WIDTH;
   art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES;
   art->listener = view3d_buttons_region_listener;
   art->message_subscribe = ED_area_do_mgs_subscribe_for_tool_ui;