[Bf-blender-cvs] [285bea9] pie-menus: Pies:
Antony Riakiotakis
noreply at git.blender.org
Sun Jun 29 20:07:07 CEST 2014
Commit: 285bea99495645615e7ce72e618bf90402cbd409
Author: Antony Riakiotakis
Date: Sun Jun 29 21:05:56 2014 +0300
https://developer.blender.org/rB285bea99495645615e7ce72e618bf90402cbd409
Pies:
* Make position function simpler
* Fix some tooltips
===================================================================
M source/blender/editors/interface/interface.c
M source/blender/makesrna/intern/rna_userdef.c
===================================================================
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 0f32686..692d26c 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -324,31 +324,12 @@ static void ui_centered_bounds_block(wmWindow *window, uiBlock *block)
static void ui_centered_pie_bounds_block(uiBlock *block)
{
- int startx;
- int width, height;
-
const int xy[2] = {
block->pie_data.pie_center_spawned[0],
block->pie_data.pie_center_spawned[1]
};
- /* note: this is used for the splash where window bounds event has not been
- * updated by ghost, get the window bounds from ghost directly */
- ui_bounds_block(block);
-
- width = BLI_rctf_size_x(&block->rect);
- height = BLI_rctf_size_y(&block->rect);
-
- startx = xy[0] - (width * 0.5f);
-
- /* special case, 3 items means no top, make it so we are going down the full height */
- if (block->pie_data.flags & UI_PIE_3_ITEMS) {
- ui_block_translate(block, startx - block->rect.xmin, xy[1]);
- }
- else {
- int starty = xy[1] - (height * 0.5f);
- ui_block_translate(block, startx - block->rect.xmin, starty - block->rect.ymin);
- }
+ ui_block_translate(block, xy[0], xy[1]);
/* now recompute bounds and safety */
ui_bounds_block(block);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 949aeb7..ff5c1d0 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -3204,7 +3204,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
/* pie menus */
prop = RNA_def_property(srna, "pie_drag_timeout", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 1000);
- RNA_def_property_ui_text(prop, "Drag Timeout", "Pie menus turn to drag style after this amount of time (in 1/100ths of sec)");
+ RNA_def_property_ui_text(prop, "Drag Timeout", "Pie menus change to click style if key is released before this amount of time (in 1/100ths of sec)");
prop = RNA_def_property(srna, "pie_initial_timeout", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 1000);
@@ -3212,7 +3212,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop = RNA_def_property(srna, "pie_operator_timeout", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 1000);
- RNA_def_property_ui_text(prop, "Operator Timeout", "Pie menus will spawn a pie menu if button is released before this amount of time (in 1/100ths of sec)");
+ RNA_def_property_ui_text(prop, "Operator Timeout", "Supported operators will spawn a pie menu if button is held for this amount of time (in 1/100ths of sec)");
prop = RNA_def_property(srna, "pie_menu_radius", PROP_INT, PROP_PIXEL);
RNA_def_property_range(prop, 0, 1000);
More information about the Bf-blender-cvs
mailing list