From fa2220862856936839a4023fdb6e000f3c93d86f Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Fri, 1 May 2020 19:00:24 +0200 Subject: groupbox first implementation only classic theme for now, will do uxtheme soon --- alf/alfpanel.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'alf/alfpanel.cpp') diff --git a/alf/alfpanel.cpp b/alf/alfpanel.cpp index 31c485f..476bdb4 100644 --- a/alf/alfpanel.cpp +++ b/alf/alfpanel.cpp @@ -9,13 +9,13 @@ typedef struct { DWORD edge; } ALFPanelPriv; -static void ALF_Panel_CalculateContainerMetrics(ALFLayout *layout, HWND hwnd, RECT *margins, SIZE *minSize); +static void ALF_Panel_CalculateContainerMetrics(ALFLayout *layout, HWND hwnd, SIZE *minSize); static void ALF_Panel_IntializePriv(ALFPanelPriv *priv) { ALF_Layout_Init(&priv->layout); - priv->layout.calculateContainerMetrics = ALF_Panel_CalculateContainerMetrics; + priv->layout.endCalcSizes = ALF_Panel_CalculateContainerMetrics; } static void @@ -78,7 +78,7 @@ ALF_PanelSetVTable(HWND panel, const ALFPanelVTable *vtbl, void *closure) } static void -ALF_Panel_CalculateContainerMetrics(ALFLayout *layout, HWND hwnd, RECT *margins, SIZE *minSize) +ALF_Panel_CalculateContainerMetrics(ALFLayout *layout, HWND hwnd, SIZE *minSize) { (void)hwnd; ALFPanelPriv *priv = (ALFPanelPriv *)layout; @@ -91,7 +91,10 @@ ALF_Panel_CalculateContainerMetrics(ALFLayout *layout, HWND hwnd, RECT *margins, if (priv->edge & BDR_OUTER) w++; - margins->left = margins->right = margins->top = margins->bottom = w; + priv->layout.containerMargins.left = w; + priv->layout.containerMargins.top = w; + priv->layout.containerMargins.right = w; + priv->layout.containerMargins.bottom = w; minSize->cx = minSize->cy = 2*w; } -- cgit v1.2.3