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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-06 19:36:54 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-06 21:14:58 +0300
commit16e220c95929365e3e75479018bdbd71b0ad2981 (patch)
tree9d9c2f6bc27468e3e7076f167dbc35ed5c0f0edc /source/blender/editors/screen/area.c
parenta3e74acd9ee2879898389cb9d33950f44494932e (diff)
Cleanup: deprecate area.headertype.
This was still used in a few places but not kept in sync with the actual header position. Always get alignment from the header region now.
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 611e5fdd636..2357f5cdb69 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1729,7 +1729,6 @@ void ED_area_data_copy(ScrArea *sa_dst, ScrArea *sa_src, const bool do_free)
const char spacetype = sa_dst->spacetype;
const short flag_copy = HEADER_NO_PULLDOWN;
- sa_dst->headertype = sa_src->headertype;
sa_dst->spacetype = sa_src->spacetype;
sa_dst->type = sa_src->type;
@@ -1759,7 +1758,6 @@ void ED_area_data_copy(ScrArea *sa_dst, ScrArea *sa_src, const bool do_free)
void ED_area_data_swap(ScrArea *sa_dst, ScrArea *sa_src)
{
- SWAP(short, sa_dst->headertype, sa_src->headertype);
SWAP(char, sa_dst->spacetype, sa_src->spacetype);
SWAP(SpaceType *, sa_dst->type, sa_src->type);
@@ -2327,6 +2325,18 @@ int ED_area_headersize(void)
return (int)(HEADERY * UI_DPI_FAC);
}
+
+int ED_area_header_alignment(const ScrArea *area)
+{
+ for (ARegion *ar = area->regionbase.first; ar; ar = ar->next) {
+ if (ar->regiontype == RGN_TYPE_HEADER) {
+ return ar->alignment;
+ }
+ }
+
+ return RGN_ALIGN_NONE;
+}
+
/**
* \return the final height of a global \a area, accounting for DPI.
*/