summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/emulation_widget.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/emulation_widget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/emulation_widget.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/noncore/apps/opie-console/emulation_widget.cpp b/noncore/apps/opie-console/emulation_widget.cpp
index 4688551..f0708d0 100644
--- a/noncore/apps/opie-console/emulation_widget.cpp
+++ b/noncore/apps/opie-console/emulation_widget.cpp
@@ -215,28 +215,24 @@ void EmulationWidget::paintEvent( QPaintEvent* pe )
215 drawAttrString( unistr, painter, QRect( m_blX+tLx+f_width*x,m_bY+tLy+f_height*y,f_width*len,f_height ), m_image[loc(x ,y )], pm != 0l, false ); 215 drawAttrString( unistr, painter, QRect( m_blX+tLx+f_width*x,m_bY+tLy+f_height*y,f_width*len,f_height ), m_image[loc(x ,y )], pm != 0l, false );
216 x +=len -1; 216 x +=len -1;
217 } 217 }
218 delete [] disstrU; 218 delete [] disstrU;
219 drawFrame( &painter ); 219 drawFrame( &painter );
220 painter.end(); 220 painter.end();
221} 221}
222 222
223void EmulationWidget::calcGeometry() 223void EmulationWidget::calcGeometry()
224{ 224{
225 m_scrollbar->resize(QApplication::style().scrollBarExtent().width(), contentsRect().height() ); 225 m_scrollbar->resize(QApplication::style().scrollBarExtent().width(), contentsRect().height() );
226 226
227 odebug << QString(" TEST").arg( contentsRect().width() ) << oendl;
228 odebug << QString(" TEST").arg( contentsRect().height() ) << oendl;
229 odebug << "NEUER TESTT!!!!!!!!" << oendl;
230
231 switch( scrollLoc ) 227 switch( scrollLoc )
232 { 228 {
233 case SCRNONE : 229 case SCRNONE :
234 m_columns = ( contentsRect().width() -2 * rimX ) / f_width; 230 m_columns = ( contentsRect().width() -2 * rimX ) / f_width;
235 m_blX = ( contentsRect().width() - ( m_columns*f_width ) ) / 2; 231 m_blX = ( contentsRect().width() - ( m_columns*f_width ) ) / 2;
236 m_brX = m_blX; 232 m_brX = m_blX;
237 m_scrollbar->hide(); 233 m_scrollbar->hide();
238 break; 234 break;
239 case SCRLEFT : 235 case SCRLEFT :
240 m_columns = ( contentsRect().width() - 2 * rimX - m_scrollbar->width() ) / f_width; 236 m_columns = ( contentsRect().width() - 2 * rimX - m_scrollbar->width() ) / f_width;
241 m_brX = ( contentsRect().width() - ( m_columns*f_width ) - m_scrollbar->width() ) / 2; 237 m_brX = ( contentsRect().width() - ( m_columns*f_width ) - m_scrollbar->width() ) / 2;
242 m_blX = m_brX + m_scrollbar->width(); 238 m_blX = m_brX + m_scrollbar->width();
@@ -249,39 +245,37 @@ void EmulationWidget::calcGeometry()
249 m_brX = m_blX; 245 m_brX = m_blX;
250 m_scrollbar->move( contentsRect().topRight() - QPoint (m_scrollbar->width()-1,0 ) ); 246 m_scrollbar->move( contentsRect().topRight() - QPoint (m_scrollbar->width()-1,0 ) );
251 m_scrollbar->show(); 247 m_scrollbar->show();
252 break; 248 break;
253 } 249 }
254 250
255 m_lines = ( contentsRect().height() - 2 * rimY ) / f_height; 251 m_lines = ( contentsRect().height() - 2 * rimY ) / f_height;
256 m_bY = ( contentsRect().height() - (m_lines * f_height ) ) / 2; 252 m_bY = ( contentsRect().height() - (m_lines * f_height ) ) / 2;
257} 253}
258 254
259void EmulationWidget::drawAttrString( QString& string, QPainter &painter, QRect rect, Character attr, bool usePixmap, bool clear ) 255void EmulationWidget::drawAttrString( QString& string, QPainter &painter, QRect rect, Character attr, bool usePixmap, bool clear )
260{ 256{
261 owarn << "Color1 " << color_table[attr.b].color.name().latin1() << "" << oendl;
262 if ( usePixmap && color_table[attr.b].transparent ) 257 if ( usePixmap && color_table[attr.b].transparent )
263 { 258 {
264 painter.setBackgroundMode( TransparentMode ); 259 painter.setBackgroundMode( TransparentMode );
265 if ( clear ) 260 if ( clear )
266 erase( rect ); 261 erase( rect );
267 } 262 }
268 else 263 else
269 { 264 {
270 if ( blinking ) 265 if ( blinking )
271 painter.fillRect( rect, color_table[attr.b].color ); 266 painter.fillRect( rect, color_table[attr.b].color );
272 else 267 else
273 { 268 {
274 painter.setBackgroundMode( OpaqueMode ); 269 painter.setBackgroundMode( OpaqueMode );
275 owarn << "Color " << color_table[attr.b].color.name().latin1() << "" << oendl;
276 painter.setBackgroundColor( color_table[attr.b].color ); 270 painter.setBackgroundColor( color_table[attr.b].color );
277 } 271 }
278 } 272 }
279 if ( color_table[attr.f].bold ) 273 if ( color_table[attr.f].bold )
280 painter.setPen( QColor( 0x8F, 0x00, 0x00 ) ); 274 painter.setPen( QColor( 0x8F, 0x00, 0x00 ) );
281 else 275 else
282 painter.setPen( color_table[attr.f].color ); 276 painter.setPen( color_table[attr.f].color );
283 painter.drawText( rect.x(), rect.y() + f_ascent, string ); 277 painter.drawText( rect.x(), rect.y() + f_ascent, string );
284 278
285} 279}
286 280
287 281