Improved Area Border Selection and Dragging
Allow use of the full width of visible borders when dragging to resize areas. Differential Revision: https://developer.blender.org/D7823 Reviewed by Brecht Van Lommel
This commit is contained in:
parent
5254ffa17b
commit
4e8693ffcd
|
@ -690,8 +690,10 @@ void ED_screen_set_active_region(bContext *C, wmWindow *win, const int xy[2])
|
|||
ARegion *region_prev = screen->active_region;
|
||||
|
||||
ED_screen_areas_iter (win, screen, area_iter) {
|
||||
if (xy[0] > area_iter->totrct.xmin && xy[0] < area_iter->totrct.xmax) {
|
||||
if (xy[1] > area_iter->totrct.ymin && xy[1] < area_iter->totrct.ymax) {
|
||||
if (xy[0] > (area_iter->totrct.xmin + BORDERPADDING) &&
|
||||
xy[0] < (area_iter->totrct.xmax - BORDERPADDING)) {
|
||||
if (xy[1] > (area_iter->totrct.ymin + BORDERPADDING) &&
|
||||
xy[1] < (area_iter->totrct.ymax - BORDERPADDING)) {
|
||||
if (ED_area_azones_update(area_iter, xy) == NULL) {
|
||||
area = area_iter;
|
||||
break;
|
||||
|
|
|
@ -92,7 +92,7 @@ ScrEdge *screen_geom_area_map_find_active_scredge(const ScrAreaMap *area_map,
|
|||
const int mx,
|
||||
const int my)
|
||||
{
|
||||
int safety = U.widget_unit / 10;
|
||||
int safety = BORDERPADDING;
|
||||
|
||||
CLAMP_MIN(safety, 2);
|
||||
|
||||
|
|
|
@ -35,6 +35,9 @@ struct bContextDataResult;
|
|||
#define AZONEFADEIN (5.0f * U.widget_unit) /* when azone is totally visible */
|
||||
#define AZONEFADEOUT (6.5f * U.widget_unit) /* when we start seeing the azone */
|
||||
|
||||
/* Expanded interaction influence of area borders. */
|
||||
#define BORDERPADDING (U.dpi_fac + U.pixelsize)
|
||||
|
||||
/* area.c */
|
||||
void ED_area_data_copy(ScrArea *area_dst, ScrArea *area_src, const bool do_free);
|
||||
void ED_area_data_swap(ScrArea *sa1, ScrArea *sa2);
|
||||
|
|
Loading…
Reference in New Issue