summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-02-29 19:50:45 (UTC)
committer llornkcor <llornkcor>2004-02-29 19:50:45 (UTC)
commit225b92ec28bbe3a9368e8534323a3c335432e447 (patch) (unidiff)
treefd87695f00a655bcfa0a9276bb43dc9ac2e1fa13
parent1a59dd467d210703b69d2d694f95988f2e97c27f (diff)
downloadopie-225b92ec28bbe3a9368e8534323a3c335432e447.zip
opie-225b92ec28bbe3a9368e8534323a3c335432e447.tar.gz
opie-225b92ec28bbe3a9368e8534323a3c335432e447.tar.bz2
initialize int
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/TEWidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp
index 2e3e0f5..de5e585 100644
--- a/core/apps/embeddedkonsole/TEWidget.cpp
+++ b/core/apps/embeddedkonsole/TEWidget.cpp
@@ -1197,65 +1197,65 @@ void TEWidget::Bell()
1197//# endif 1197//# endif
1198//#endif 1198//#endif
1199 1199
1200// QApplication::beep(); 1200// QApplication::beep();
1201} 1201}
1202 1202
1203/* ------------------------------------------------------------------------- */ 1203/* ------------------------------------------------------------------------- */
1204/* */ 1204/* */
1205/* Auxiluary */ 1205/* Auxiluary */
1206/* */ 1206/* */
1207/* ------------------------------------------------------------------------- */ 1207/* ------------------------------------------------------------------------- */
1208 1208
1209void TEWidget::clearImage() 1209void TEWidget::clearImage()
1210// initialize the image 1210// initialize the image
1211// for internal use only 1211// for internal use only
1212{ 1212{
1213 for (int y = 0; y < lines; y++) 1213 for (int y = 0; y < lines; y++)
1214 for (int x = 0; x < columns; x++) 1214 for (int x = 0; x < columns; x++)
1215 { 1215 {
1216 image[loc(x,y)].c = 0xff; //' '; 1216 image[loc(x,y)].c = 0xff; //' ';
1217 image[loc(x,y)].f = 0xff; //DEFAULT_FORE_COLOR; 1217 image[loc(x,y)].f = 0xff; //DEFAULT_FORE_COLOR;
1218 image[loc(x,y)].b = 0xff; //DEFAULT_BACK_COLOR; 1218 image[loc(x,y)].b = 0xff; //DEFAULT_BACK_COLOR;
1219 image[loc(x,y)].r = 0xff; //DEFAULT_RENDITION; 1219 image[loc(x,y)].r = 0xff; //DEFAULT_RENDITION;
1220 } 1220 }
1221} 1221}
1222 1222
1223// Create Image /////////////////////////////////////////////////////// 1223// Create Image ///////////////////////////////////////////////////////
1224 1224
1225void TEWidget::calcGeometry() 1225void TEWidget::calcGeometry()
1226{ 1226{
1227 int showhscrollbar = 1; 1227 int showhscrollbar = 1;
1228 int hwidth = 0; 1228 int hwidth = 0;
1229 int dcolumns; 1229 int dcolumns = 0;
1230 Config cfg( "Konsole" ); 1230 Config cfg( "Konsole" );
1231 cfg.setGroup("ScrollBar"); 1231 cfg.setGroup("ScrollBar");
1232 useHorzScroll=cfg.readBoolEntry("HorzScroll",0); 1232 useHorzScroll=cfg.readBoolEntry("HorzScroll",0);
1233 1233
1234 if(vcolumns == 0) showhscrollbar = 0; 1234 if(vcolumns == 0) showhscrollbar = 0;
1235 if(showhscrollbar == 1) hwidth = QApplication::style().scrollBarExtent().width(); 1235 if(showhscrollbar == 1) hwidth = QApplication::style().scrollBarExtent().width();
1236 1236
1237 scrollbar->resize(QApplication::style().scrollBarExtent().width(), 1237 scrollbar->resize(QApplication::style().scrollBarExtent().width(),
1238 contentsRect().height() - hwidth); 1238 contentsRect().height() - hwidth);
1239 1239
1240 switch(scrollLoc) { 1240 switch(scrollLoc) {
1241 case SCRNONE : 1241 case SCRNONE :
1242 columns = ( contentsRect().width() - 2 * rimX ) / font_w; 1242 columns = ( contentsRect().width() - 2 * rimX ) / font_w;
1243 dcolumns = columns; 1243 dcolumns = columns;
1244 if(vcolumns) columns = vcolumns; 1244 if(vcolumns) columns = vcolumns;
1245 blX = (contentsRect().width() - (columns*font_w) ) / 2; 1245 blX = (contentsRect().width() - (columns*font_w) ) / 2;
1246 if(showhscrollbar) 1246 if(showhscrollbar)
1247 blX = -hposition * font_w; 1247 blX = -hposition * font_w;
1248 brX = blX; 1248 brX = blX;
1249 scrollbar->hide(); 1249 scrollbar->hide();
1250 break; 1250 break;
1251 case SCRLEFT : 1251 case SCRLEFT :
1252 columns = ( contentsRect().width() - 2 * rimX - scrollbar->width()) / font_w; 1252 columns = ( contentsRect().width() - 2 * rimX - scrollbar->width()) / font_w;
1253 dcolumns = columns; 1253 dcolumns = columns;
1254 if(vcolumns) columns = vcolumns; 1254 if(vcolumns) columns = vcolumns;
1255 brX = (contentsRect().width() - (columns*font_w) - scrollbar->width() ) / 2; 1255 brX = (contentsRect().width() - (columns*font_w) - scrollbar->width() ) / 2;
1256 if(showhscrollbar) 1256 if(showhscrollbar)
1257 brX = -hposition * font_w; 1257 brX = -hposition * font_w;
1258 blX = brX + scrollbar->width(); 1258 blX = brX + scrollbar->width();
1259 scrollbar->move(contentsRect().topLeft()); 1259 scrollbar->move(contentsRect().topLeft());
1260 scrollbar->show(); 1260 scrollbar->show();
1261 break; 1261 break;