fixed inheritance of parent properties.

This commit is contained in:
Martin Preuss
2024-05-30 23:01:23 +02:00
parent 0a5653b250
commit da00ee39e4

View File

@@ -64,10 +64,12 @@ void AQDG_DrawableWidget_Extend(AQDG_OBJECT *object, AQDG_DRAW_CONTEXT *drawCont
xo->drawFn=_drawFallback; xo->drawFn=_drawFallback;
parent=AQDG_Object_Tree2_GetParent(object); parent=AQDG_Object_Tree2_GetParent(object);
if (parent && GWEN_INHERIT_ISOFTYPE(AQDG_OBJECT, AQDG_OBJECT_DRAWABLE, parent)) { if (parent) {
xo->fontId=AQDG_DrawableWidget_GetFontId(parent); if (GWEN_INHERIT_ISOFTYPE(AQDG_OBJECT, AQDG_OBJECT_DRAWABLE, parent)) {
xo->foregroundPenId=AQDG_DrawableWidget_GetForegroundPenId(parent); xo->fontId=AQDG_DrawableWidget_GetFontId(parent);
xo->backgroundPenId=AQDG_DrawableWidget_GetBackgroundPenId(parent); xo->foregroundPenId=AQDG_DrawableWidget_GetForegroundPenId(parent);
xo->backgroundPenId=AQDG_DrawableWidget_GetBackgroundPenId(parent);
}
AQDG_Object_SetBorderLeft(object, AQDG_Object_GetBorderLeft(parent)); AQDG_Object_SetBorderLeft(object, AQDG_Object_GetBorderLeft(parent));
AQDG_Object_SetBorderRight(object,AQDG_Object_GetBorderRight(parent)); AQDG_Object_SetBorderRight(object,AQDG_Object_GetBorderRight(parent));
AQDG_Object_SetBorderTop(object, AQDG_Object_GetBorderTop(parent)); AQDG_Object_SetBorderTop(object, AQDG_Object_GetBorderTop(parent));