summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src/history_control.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewStory/src/history_control.cpp')
-rw-r--r--plugins/NewStory/src/history_control.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index b5e323d412..d559085d5f 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -676,32 +676,31 @@ void NewstoryListData::Paint(simpledib::dib &dib, RECT *rcDraw)
POINT pos;
int height = pItem->calcHeight(top, cachedWindowWidth, &pos);
- COLORREF clText, clBack, clLine;
+ COLORREF clLine;
int fontid, colorid;
pItem->getFontColor(fontid, colorid);
if (pItem->m_bHighlighted) {
- clText = g_fontTable[FONT_HIGHLIGHT].cl;
- clBack = g_colorTable[COLOR_HIGHLIGHT_BACK].cl;
+ webPage.clText = g_fontTable[FONT_HIGHLIGHT].cl;
+ webPage.clBack = g_colorTable[COLOR_HIGHLIGHT_BACK].cl;
clLine = g_colorTable[COLOR_FRAME].cl;
}
else if (pItem->m_bSelected) {
- clText = g_colorTable[COLOR_SELTEXT].cl;
- clBack = g_colorTable[COLOR_SELBACK].cl;
+ webPage.clText = g_colorTable[COLOR_SELTEXT].cl;
+ webPage.clBack = g_colorTable[COLOR_SELBACK].cl;
clLine = g_colorTable[COLOR_SELFRAME].cl;
}
else {
- clText = g_fontTable[fontid].cl;
+ webPage.clText = g_fontTable[fontid].cl;
+ webPage.clBack = g_colorTable[colorid].cl;
clLine = g_colorTable[COLOR_FRAME].cl;
- clBack = g_colorTable[colorid].cl;
}
- HBRUSH hbr = CreateSolidBrush(clBack);
+ HBRUSH hbr = CreateSolidBrush(webPage.clBack);
RECT rc = { 0, top, cachedWindowWidth, top + height };
FillRect(dib, &rc, hbr);
DeleteObject(hbr);
- SetTextColor(dib, clText);
SetBkMode(dib, TRANSPARENT);
pos.x = 2;
@@ -786,6 +785,9 @@ void NewstoryListData::Paint(simpledib::dib &dib, RECT *rcDraw)
RECT rc = { 0, 0, cachedWindowWidth, cachedWindowHeight };
DrawEdge(dib, &rc, BDR_SUNKENOUTER, BF_RECT);
}
+
+ cairo_destroy(cr);
+ cairo_surface_destroy(surface);
}
void NewstoryListData::RecalcScrollBar()