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:
authorCampbell Barton <ideasman42@gmail.com>2020-08-16 14:14:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-16 14:14:26 +0300
commit59bc71d69b138db12c9017c7a7d492fdb6dcddc3 (patch)
tree76843fbd74a77f31c8a66a20a32de7b613c48416 /source/blender/editors/screen/area.c
parent73fb445b8dbe88b1ac8e12acd2515618f9e64ac0 (diff)
Fix popups opening in the wrong direction over headers
Checks for header alignment didn't account for tool-header & header having different alignment. There is no reason to use a lookup function on the area (ED_area_header_alignment) as we already have region. Check the regions alignment directly, remove access functions.
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 296fe24edcd..df33222ce37 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -3159,43 +3159,11 @@ int ED_area_headersize(void)
return U.widget_unit + (int)(UI_DPI_FAC * HEADER_PADDING_Y);
}
-int ED_area_header_alignment_or_fallback(const ScrArea *area, int fallback)
-{
- LISTBASE_FOREACH (ARegion *, region, &area->regionbase) {
- if (region->regiontype == RGN_TYPE_HEADER) {
- return region->alignment;
- }
- }
- return fallback;
-}
-
-int ED_area_header_alignment(const ScrArea *area)
-{
- return ED_area_header_alignment_or_fallback(
- area, (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_BOTTOM : RGN_ALIGN_TOP);
-}
-
int ED_area_footersize(void)
{
return ED_area_headersize();
}
-int ED_area_footer_alignment_or_fallback(const ScrArea *area, int fallback)
-{
- LISTBASE_FOREACH (ARegion *, region, &area->regionbase) {
- if (region->regiontype == RGN_TYPE_FOOTER) {
- return region->alignment;
- }
- }
- return fallback;
-}
-
-int ED_area_footer_alignment(const ScrArea *area)
-{
- return ED_area_footer_alignment_or_fallback(
- area, (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_TOP : RGN_ALIGN_BOTTOM);
-}
-
/**
* \return the final height of a global \a area, accounting for DPI.
*/