165 // |
165 // |
166 void CBrowserWindowSelectionContainer::Draw(const TRect& aRect) const |
166 void CBrowserWindowSelectionContainer::Draw(const TRect& aRect) const |
167 { |
167 { |
168 CWindowGc& gc = SystemGc(); |
168 CWindowGc& gc = SystemGc(); |
169 |
169 |
170 // example code... |
170 // Create a gray background... |
171 gc.SetPenStyle( CGraphicsContext::ENullPen ); |
171 gc.SetPenColor(TRgb(45,44,50)); |
172 gc.SetBrushColor( KRgbWhite ); |
172 gc.SetPenStyle(CGraphicsContext::ESolidPen); |
|
173 gc.SetBrushColor( KRgbDarkGray ); |
173 gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); |
174 gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); |
174 gc.DrawRect( aRect ); |
175 gc.DrawRect( aRect ); |
175 |
176 |
176 if ( iThumbnail ) |
177 if ( iThumbnail ) |
177 { |
178 { |
|
179 #ifdef BRDO_MULTITOUCH_ENABLED_FF |
|
180 TSize viewSize(aRect.Width(), aRect.Height()); |
|
181 int centerImageWidth(viewSize.iWidth*60/100); |
|
182 int centerImageHeight(viewSize.iHeight*75/100); |
|
183 int centerImageX(viewSize.iWidth*20/100); |
|
184 int centerImageY(viewSize.iHeight*(100-75)/(2*100)); |
|
185 TPoint centerImageOrigin(centerImageX, centerImageY); |
|
186 #endif |
178 // Put in center |
187 // Put in center |
179 // release |
188 // release |
180 TSize bitmapSize = iThumbnail->Bitmap()->SizeInPixels(); |
189 TSize bitmapSize = iThumbnail->Bitmap()->SizeInPixels(); |
181 // test |
190 // test |
182 //TSize bitmapSize = iThumbnail->SizeInPixels(); |
191 //TSize bitmapSize = iThumbnail->SizeInPixels(); |
183 TInt x = ( aRect.Width()-bitmapSize.iWidth ) / 2; |
192 TInt x = ( aRect.Width()-bitmapSize.iWidth ) / 2; |
184 TInt y = ( aRect.Height()-bitmapSize.iHeight ) / 2; |
193 TInt y = ( aRect.Height()-bitmapSize.iHeight ) / 2; |
185 // Draw thumbnail |
194 // Draw thumbnail |
186 // release |
195 // release |
187 gc.BitBlt( TPoint(x,y), iThumbnail->Bitmap() ); |
196 #ifdef BRDO_MULTITOUCH_ENABLED_FF |
|
197 gc.BitBlt( centerImageOrigin, iThumbnail->Bitmap(), TRect(0, 0, centerImageWidth, centerImageHeight) ); |
|
198 #else |
|
199 gc.BitBlt( TPoint(x,y), iThumbnail->Bitmap() ); |
|
200 #endif |
188 // test |
201 // test |
189 // gc.BitBlt( TPoint(x,y), iThumbnail ); |
202 // gc.BitBlt( TPoint(x,y), iThumbnail ); |
190 } |
203 } |
191 } |
204 } |
192 |
205 |