summaryrefslogtreecommitdiff
path: root/alf/alfpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alf/alfpanel.cpp')
-rw-r--r--alf/alfpanel.cpp41
1 files changed, 2 insertions, 39 deletions
diff --git a/alf/alfpanel.cpp b/alf/alfpanel.cpp
index 663dbd0..965264e 100644
--- a/alf/alfpanel.cpp
+++ b/alf/alfpanel.cpp
@@ -4,8 +4,6 @@ TCHAR *_alf_panelClass = NULL;
typedef struct {
ALFLayout layout;
- ALFColor bgcolor;
- HFONT font;
const ALFPanelVTable *vtbl;
void *closure;
} ALFPanelPriv;
@@ -14,7 +12,6 @@ static void
ALF_Panel_IntializePriv(ALFPanelPriv *priv)
{
ALF_Layout_Init(&priv->layout);
- priv->bgcolor = ALF_COLOR_TRANSPARENT;
}
static void
@@ -28,10 +25,10 @@ ALF_Panel_Paint(ALFPanelPriv *priv, HWND hwnd, HDC dc, RECT *r)
{
if (priv->vtbl && priv->vtbl->paint) {
priv->vtbl->paint(priv->closure, hwnd, dc, r);
- } else if (priv->bgcolor == ALF_COLOR_TRANSPARENT) {
+ } else if (priv->layout.bgcolor == ALF_COLOR_TRANSPARENT) {
ALF_Compat_DrawThemeParentBackground(hwnd, dc, r);
} else {
- ALF_FillRect(dc, r, priv->bgcolor);
+ ALF_FillRect(dc, r, priv->layout.bgcolor);
}
}
@@ -60,31 +57,6 @@ ALF_Panel_DefWindowProc(HWND window, UINT msg, WPARAM wparam, LPARAM lparam)
return TRUE;
}
- if (msg == WM_SETFONT) {
- priv->font = (HFONT)wparam;
- if (LOWORD(lparam) != 0)
- InvalidateRect(window, NULL, TRUE);
-
- // fallthrough to layout, will propagate font to children
- }
-
- if (msg == ALF_WM_GETBGCOLOR) {
- return (LRESULT)priv->bgcolor;
- }
-
- if (msg == ALF_WM_SETBGCOLOR) {
- priv->bgcolor = (ALFColor)lparam;
-
- InvalidateRect(window, NULL, TRUE);
-
- // fallthrough to layout, will propagate color to children
- // and invalidate the background of transparent children
- }
-
- if (msg == WM_GETFONT) {
- return (LRESULT)priv->font;
- }
-
if (msg == WM_SETTEXT) {
InvalidateRect(window, NULL, TRUE);
}
@@ -122,15 +94,6 @@ ALF_Panel_DefWindowProc(HWND window, UINT msg, WPARAM wparam, LPARAM lparam)
ALF_Layout_Apply(&priv->layout, window);
}
- if (msg == ALF_WM_BACKGROUNDCHANGE) {
- if (priv->bgcolor != ALF_COLOR_TRANSPARENT)
- return 0; // nothing to do here, background is our own solid color
-
- InvalidateRect(window, NULL, TRUE);
-
- // fallthrough to layout, will propagate to transparent children
- }
-
LRESULT ret = 0;
if (ALF_Layout_HandleMessage(&priv->layout, window, msg, wparam, lparam, &ret))
return ret;