-rw-r--r-- | noncore/apps/opie-console/emulation_widget.cpp | 9 | ||||
-rw-r--r-- | noncore/apps/opie-console/emulation_widget.h | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/widget_layer.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/widget_layer.h | 5 |
4 files changed, 21 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 | |||
@@ -92,2 +92,9 @@ static QChar vt100extended(QChar c) | |||
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 | ||
@@ -119,3 +126,3 @@ void EmulationWidget::setImage( QArray<Character> const newimg, int lines, int c | |||
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 ) |
diff --git a/noncore/apps/opie-console/emulation_widget.h b/noncore/apps/opie-console/emulation_widget.h index e185534..5e20dc4 100644 --- a/noncore/apps/opie-console/emulation_widget.h +++ b/noncore/apps/opie-console/emulation_widget.h | |||
@@ -62,2 +62,4 @@ public: | |||
62 | 62 | ||
63 | virtual QSize calcSize( int cols, int lins ) const; | ||
64 | |||
63 | protected: | 65 | protected: |
diff --git a/noncore/apps/opie-console/widget_layer.cpp b/noncore/apps/opie-console/widget_layer.cpp index e4b0ede..ac84f8b 100644 --- a/noncore/apps/opie-console/widget_layer.cpp +++ b/noncore/apps/opie-console/widget_layer.cpp | |||
@@ -55,2 +55,8 @@ WidgetLayer::~WidgetLayer() | |||
55 | 55 | ||
56 | QSize WidgetLayer::sizeHint() | ||
57 | { | ||
58 | return size(); | ||
59 | } | ||
60 | |||
61 | |||
56 | /* --------------------------------- audio ---------------------------------- */ | 62 | /* --------------------------------- audio ---------------------------------- */ |
diff --git a/noncore/apps/opie-console/widget_layer.h b/noncore/apps/opie-console/widget_layer.h index 0c290f3..6812711 100644 --- a/noncore/apps/opie-console/widget_layer.h +++ b/noncore/apps/opie-console/widget_layer.h | |||
@@ -125,2 +125,7 @@ public: | |||
125 | virtual bool eventFilter( QObject *obj, QEvent *event ); | 125 | virtual bool eventFilter( QObject *obj, QEvent *event ); |
126 | |||
127 | |||
128 | QSize sizeHint(); | ||
129 | |||
130 | virtual QSize calcSize( int cols, int lins ) const = 0; | ||
126 | signals: | 131 | signals: |