author | harlekin <harlekin> | 2002-10-14 19:01:58 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-14 19:01:58 (UTC) |
commit | 7d6fea084fc40160285fe3898bd56cec3902dca0 (patch) (side-by-side diff) | |
tree | 071cdc8fc710557d4cfbde39e6bc7770e852c32b /noncore/apps/opie-console/emulation_widget.cpp | |
parent | 678b36abe519019158765a1e57cd858dae55ca2f (diff) | |
download | opie-7d6fea084fc40160285fe3898bd56cec3902dca0.zip opie-7d6fea084fc40160285fe3898bd56cec3902dca0.tar.gz opie-7d6fea084fc40160285fe3898bd56cec3902dca0.tar.bz2 |
parity none added
Diffstat (limited to 'noncore/apps/opie-console/emulation_widget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/emulation_widget.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/emulation_widget.cpp b/noncore/apps/opie-console/emulation_widget.cpp index 9138f29..d8e342b 100644 --- a/noncore/apps/opie-console/emulation_widget.cpp +++ b/noncore/apps/opie-console/emulation_widget.cpp @@ -39,12 +39,13 @@ EmulationWidget::EmulationWidget( const Profile& config, QWidget *parent, const // initialize font attributes QFontMetrics fm( font() ); f_height = fm.height(); f_width = fm.maxWidth(); f_ascent = fm.ascent(); + // initialize scrollbar related vars m_scrollbar = new QScrollBar( this ); m_scrollbar->setCursor( arrowCursor ); // give reasonable defaults to m_columns, m_lines calcGeometry(); @@ -106,12 +107,13 @@ static QChar vt100extended(QChar c) } QSize EmulationWidget::calcSize( int cols, int lins ) const { int frw = width() - contentsRect().width(); + int frh = height() - contentsRect().height(); int scw = (scrollLoc == SCRNONE? 0 : m_scrollbar->width() ); return QSize( f_width * cols + 2 * rimX + frw + scw, f_height * lins + 2 * rimY + frh ); } void EmulationWidget::setImage( QArray<Character> const newimg, int lines, int columns ) @@ -230,12 +232,16 @@ void EmulationWidget::paintEvent( QPaintEvent* pe ) } void EmulationWidget::calcGeometry() { m_scrollbar->resize(QApplication::style().scrollBarExtent().width(), contentsRect().height() ); + qDebug( QString(" TEST").arg( contentsRect().width() ) ); + qDebug( QString(" TEST").arg( contentsRect().height() ) ); + qDebug("NEUER TESTT!!!!!!!!"); + switch( scrollLoc ) { case SCRNONE : m_columns = ( contentsRect().width() -2 * rimX ) / f_width; m_blX = ( contentsRect().width() - ( m_columns*f_width ) ) / 2; m_brX = m_blX; |