Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2015-08-14 23:16:04 +0300
committerJulian Eisel <eiseljulian@gmail.com>2015-08-14 23:23:06 +0300
commit9b729adb6e2e5158739dfeb5653ca3fb75cda599 (patch)
treecdaced800c84cfc32a581b73b497bc975253041c /source/blender/editors/interface/interface_regions.c
parentd9a720a709c8c4358edb3051c0f2c0daf4482cd2 (diff)
Remove redundant workaround for T41548
Reverts 7a026971dc3f93 which isn't needed anymore after b347f523cececdf
Diffstat (limited to 'source/blender/editors/interface/interface_regions.c')
-rw-r--r--source/blender/editors/interface/interface_regions.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 6aabbbe76b6..6552625c911 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -1119,6 +1119,7 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
float aspect = but->block->aspect;
rctf rect_fl;
rcti rect_i;
+ const int margin = UI_POPUP_MARGIN;
int winx /*, winy */, ofsx, ofsy;
int i;
@@ -1160,8 +1161,6 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
/* compute position */
if (but->block->flag & UI_BLOCK_SEARCH_MENU) {
- const int margin_x = UI_POPUP_MARGIN;
- const int margin_y = MENU_TOP;
const int search_but_h = BLI_rctf_size_y(&but->rect) + 10;
/* this case is search menu inside other menu */
/* we copy region size */
@@ -1169,11 +1168,10 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
ar->winrct = butregion->winrct;
/* widget rect, in region coords */
- data->bbox.xmin = margin_x;
- data->bbox.xmax = BLI_rcti_size_x(&ar->winrct) - margin_x;
- /* Do not use shadow width for height, gives insane margin with big shadows, and issue T41548 with small ones */
- data->bbox.ymin = margin_y;
- data->bbox.ymax = BLI_rcti_size_y(&ar->winrct) - margin_y;
+ data->bbox.xmin = margin;
+ data->bbox.xmax = BLI_rcti_size_x(&ar->winrct) - margin;
+ data->bbox.ymin = margin;
+ data->bbox.ymax = BLI_rcti_size_y(&ar->winrct) - margin;
/* check if button is lower half */
if (but->rect.ymax < BLI_rctf_cent_y(&but->block->rect)) {
@@ -1185,7 +1183,6 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
}
else {
const int searchbox_width = UI_searchbox_size_x();
- const int margin = UI_POPUP_MARGIN;
rect_fl.xmin = but->rect.xmin - 5; /* align text with button */
rect_fl.xmax = but->rect.xmax + 5; /* symmetrical */