--- a/webengine/webkitutils/HistoryProvider/HistoryView.cpp Thu Aug 19 10:58:56 2010 +0300
+++ b/webengine/webkitutils/HistoryProvider/HistoryView.cpp Tue Aug 31 16:17:46 2010 +0300
@@ -46,9 +46,8 @@
const int KMinAnimFactor = 0;
const int KMinimumScroll = 20;
-#define KCenterImageBorderColor TRgb(179,179,181)
+#define KCenterImageBorderColor KRgbRed
#define KSideImageBorderColor KRgbBlack
-#define KSideImageMaskColor TRgb(170, 170, 170)
// ============================= LOCAL FUNCTIONS ===============================
@@ -142,7 +141,6 @@
m_autoScrollPeriodic->Cancel();
delete m_autoScrollPeriodic;
}
- delete m_maskBitmap;
}
bool HistoryView::calcRepaintRect()
@@ -267,15 +265,6 @@
{
m_bitmapContext->Clear();
m_bitmapContext->Reset();
-
- m_bitmapContext->SetPenColor(TRgb(45,44,50));
- m_bitmapContext->SetPenStyle(CGraphicsContext::ESolidPen);
- m_bitmapContext->SetBrushColor(KRgbDarkGray);
- m_bitmapContext->SetBrushStyle(CGraphicsContext::ESolidBrush);
- m_bitmapContext->DrawRect(Rect());
- m_bitmapContext->SetBrushStyle(CGraphicsContext::ENullBrush);
- m_bitmapContext->SetPenStyle(CGraphicsContext::ENullPen);
-
// updateDisplay something to the bitmap
m_centerEntry = m_historyController->entryByIndex( m_centerPageIndex );
@@ -286,18 +275,10 @@
TRAP_IGNORE(leftEntry->constructThumbnailL());
}
if (leftEntry->thumbnail()) {
- if(!m_maskBitmap) {
- TSize maskBitmapSize(m_leftPlaceHolderRect.Size());
- TRAP_IGNORE(CreateMaskBitmapForLeftRightThumbnailL(maskBitmapSize, EGray256, KSideImageMaskColor));
- }
- if(m_maskBitmap) {
- m_bitmapContext->BitBltMasked(m_leftPlaceHolderRect.iTl, leftEntry->thumbnail(), TRect(TPoint(0,0), m_leftPlaceHolderRect.Size()), m_maskBitmap, EFalse);
- }
- else {
- //if failed to create a mask, just draw the left entry thumbnail.
- m_bitmapContext->BitBlt( m_leftPlaceHolderRect.iTl, leftEntry->thumbnail(), TRect(TPoint(0,0), m_leftPlaceHolderRect.Size()) );
- }
+ m_bitmapContext->BitBlt( m_leftPlaceHolderRect.iTl, leftEntry->thumbnail(), TRect(TPoint(0,0), m_leftPlaceHolderRect.Size()) );
}
+ m_bitmapContext->SetPenColor( KSideImageBorderColor );
+ m_bitmapContext->DrawRect(m_leftPlaceHolderRect);
}
// updateDisplay the next thumbnail
if (rightEntry) {
@@ -305,18 +286,10 @@
TRAP_IGNORE(rightEntry->constructThumbnailL());
}
if (rightEntry->thumbnail()) {
- if(!m_maskBitmap) {
- TSize maskBitmapSize(m_rightPlaceHolderRect.Size());
- TRAP_IGNORE(CreateMaskBitmapForLeftRightThumbnailL(maskBitmapSize, EGray256, KSideImageMaskColor));
- }
- if(m_maskBitmap) {
- m_bitmapContext->BitBltMasked(m_rightPlaceHolderRect.iTl, rightEntry->thumbnail(), TRect(TPoint(0,0), m_rightPlaceHolderRect.Size()), m_maskBitmap, EFalse);
- }
- else {
- //if failed to create a mask, just draw the right entry thumbnail.
- m_bitmapContext->BitBlt( m_rightPlaceHolderRect.iTl, rightEntry->thumbnail(), TRect(TPoint(0,0), m_rightPlaceHolderRect.Size()) );
- }
+ m_bitmapContext->BitBlt( m_rightPlaceHolderRect.iTl, rightEntry->thumbnail(), TRect(TPoint(0,0), m_rightPlaceHolderRect.Size()) );
}
+ m_bitmapContext->SetPenColor( KSideImageBorderColor );
+ m_bitmapContext->DrawRect(m_rightPlaceHolderRect);
}
// updateDisplay the center thumbnail
if (m_centerEntry ) {
@@ -324,24 +297,16 @@
TRAP_IGNORE(m_centerEntry->constructThumbnailL());
}
if (m_centerEntry->thumbnail()) {
- m_bitmapContext->SetBrushColor(KRgbWhite);
- m_bitmapContext->SetBrushStyle(CGraphicsContext::ESolidBrush);
- m_bitmapContext->DrawRect(m_centerPlaceHolderRect);
- m_bitmapContext->SetBrushStyle(CGraphicsContext::ENullBrush);
- TSize bitSize = m_centerEntry->thumbnail()->SizeInPixels();
m_bitmapContext->BitBlt( m_centerPlaceHolderRect.iTl, m_centerEntry->thumbnail(), TRect(TPoint(0,0), m_centerPlaceHolderRect.Size()) );
}
}
-
- //Draw border for center thumbnail
- m_bitmapContext->SetPenStyle( CGraphicsContext:: ESolidPen );
m_bitmapContext->SetPenColor( KCenterImageBorderColor );
+
m_bitmapContext->DrawRect( m_centerPlaceHolderRect );
// Reset Brush
m_bitmapContext->SetBrushColor(TRgb(255,255,255));
m_bitmapContext->SetBrushStyle(CGraphicsContext::ENullBrush);
- m_bitmapContext->SetPenStyle(CGraphicsContext::ENullPen);
// updateState(-1);
}
@@ -841,23 +806,4 @@
}
}
-
-void HistoryView::CreateMaskBitmapForLeftRightThumbnailL(TSize& aSize, TDisplayMode aDisplayMode, TRgb aRgb)
-{
- if(m_maskBitmap) {
- delete m_maskBitmap;
- m_maskBitmap = NULL;
- }
- m_maskBitmap = new (ELeave) CFbsBitmap();
- User::LeaveIfError(m_maskBitmap->Create(aSize, aDisplayMode));
- CFbsBitmapDevice* maskBitmapDevice = CFbsBitmapDevice::NewL(m_maskBitmap);
- CFbsBitGc* maskBitmapContext;
- User::LeaveIfError(maskBitmapDevice->CreateContext(maskBitmapContext));
- maskBitmapContext->SetPenStyle( CGraphicsContext::ENullPen );
- maskBitmapContext->SetBrushColor( aRgb );
- maskBitmapContext->SetBrushStyle( CGraphicsContext::ESolidBrush );
- maskBitmapContext->DrawRect(TRect(TPoint(0,0), m_maskBitmap->SizeInPixels()));
- delete maskBitmapContext;
- delete maskBitmapDevice;
-}
// End of File