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.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/emulation_widget.cpp b/noncore/apps/opie-console/emulation_widget.cpp index e11c5e4..40199fa 100644 --- a/noncore/apps/opie-console/emulation_widget.cpp +++ b/noncore/apps/opie-console/emulation_widget.cpp | |||
@@ -87,12 +87,19 @@ static QChar vt100extended(QChar c) | |||
87 | case 0x00b7 : return 31; | 87 | case 0x00b7 : return 31; |
88 | } | 88 | } |
89 | return c; | 89 | return c; |
90 | } | 90 | } |
91 | 91 | ||
92 | 92 | ||
93 | QSize EmulationWidget::calcSize( int cols, int lins ) const | ||
94 | { | ||
95 | int frw = width() - contentsRect().width(); | ||
96 | int frh = height() - contentsRect().height(); | ||
97 | int scw = (scrollLoc == SCRNONE? 0 : m_scrollbar->width() ); | ||
98 | return QSize( f_width * cols + 2 * rimX + frw + scw, f_height * lins + 2 * rimY + frh ); | ||
99 | } | ||
93 | 100 | ||
94 | void EmulationWidget::setImage( QArray<Character> const newimg, int lines, int columns ) | 101 | void EmulationWidget::setImage( QArray<Character> const newimg, int lines, int columns ) |
95 | { | 102 | { |
96 | const QPixmap* pm = backgroundPixmap(); | 103 | const QPixmap* pm = backgroundPixmap(); |
97 | QPainter paint; | 104 | QPainter paint; |
98 | 105 | ||
@@ -114,13 +121,13 @@ void EmulationWidget::setImage( QArray<Character> const newimg, int lines, int c | |||
114 | int cols = QMIN( m_columns, QMAX( 0, columns ) ); | 121 | int cols = QMIN( m_columns, QMAX( 0, columns ) ); |
115 | QArray<QChar> disstrU = QArray<QChar>( cols ); | 122 | QArray<QChar> disstrU = QArray<QChar>( cols ); |
116 | 123 | ||
117 | for ( int y = 0; y < lins; ++y ) | 124 | for ( int y = 0; y < lins; ++y ) |
118 | {int len; | 125 | {int len; |
119 | const Character* lcl = &m_image[y * m_columns]; | 126 | const Character* lcl = &m_image[y * m_columns]; |
120 | const Character* ext = &newimg[y * columns]; | 127 | const Character* ext = &newimg[y * m_columns]; |
121 | if ( ! m_resizing ) | 128 | if ( ! m_resizing ) |
122 | for ( int x = 0; x < cols; ++x ) | 129 | for ( int x = 0; x < cols; ++x ) |
123 | { | 130 | { |
124 | // disable, till widget works, WITHOUT blinking | 131 | // disable, till widget works, WITHOUT blinking |
125 | //hasBlinker |= ( ext[x].r & RE_BLINK ); | 132 | //hasBlinker |= ( ext[x].r & RE_BLINK ); |
126 | 133 | ||