Commit 93689728 authored by Reece Dunn's avatar Reece Dunn Committed by Alexandre Julliard

comctl32: Don't draw the theme background of the group box over it's content area.

Hi, Some applications (e.g. Cepstral SwiftTalker) have dialogs that contain controls that are ordered before the group box that contains them. The current rendering of themed group boxes will draw it's background over the content area, hiding any controls that have already been drawn. XP with the default and other custom themes correctly shows controls beneath the group box. This patch excludes the group box content area from being drawn to, so that any controls that have already been drawn do not get overridden. - Reece From 889e477bcb4561565b8caaf41c88c5fe7d83b8d2 Mon Sep 17 00:00:00 2001 From: Reece Dunn <msclrhd@gmail.com> Date: Fri, 7 Nov 2008 00:11:52 +0000 Subject: [PATCH] comctl32: don't draw the theme background of the group box over it's content area.
parent c48c5c85
......@@ -181,7 +181,7 @@ static void GB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UIN
{
static const int states[] = { GBS_NORMAL, GBS_DISABLED, GBS_NORMAL, GBS_NORMAL, GBS_NORMAL };
RECT bgRect, textRect;
RECT bgRect, textRect, contentRect;
HFONT font = (HFONT)SendMessageW(hwnd, WM_GETFONT, 0, 0);
HFONT hPrevFont = font ? SelectObject(hDC, font) : NULL;
int state = states[ drawState ];
......@@ -198,9 +198,12 @@ static void GB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UIN
textRect.left += 10;
textRect.bottom = textRect.top + textExtent.cy;
textRect.right = textRect.left + textExtent.cx + 4;
ExcludeClipRect(hDC, textRect.left, textRect.top, textRect.right, textRect.bottom);
}
ExcludeClipRect(hDC, textRect.left, textRect.top, textRect.right, textRect.bottom);
GetThemeBackgroundContentRect(theme, hDC, BP_GROUPBOX, state, &bgRect, &contentRect);
ExcludeClipRect(hDC, contentRect.left, contentRect.top, contentRect.right, contentRect.bottom);
if (IsThemeBackgroundPartiallyTransparent(theme, BP_GROUPBOX, state))
DrawThemeParentBackground(hwnd, hDC, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment