summaryrefslogtreecommitdiff
path: root/alf/alfpanel.cpp
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2020-05-01 19:00:24 +0200
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2020-05-01 19:00:24 +0200
commitfa2220862856936839a4023fdb6e000f3c93d86f (patch)
tree7bf06e85490246b661c825d005551aaa76abbea3 /alf/alfpanel.cpp
parent3e069b70cf30a69ea2a3f71233b8f258f54284bc (diff)
groupbox first implementation
only classic theme for now, will do uxtheme soon
Diffstat (limited to 'alf/alfpanel.cpp')
-rw-r--r--alf/alfpanel.cpp11
1 files changed, 7 insertions, 4 deletions
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;
}