equal
deleted
inserted
replaced
1210 "draw the thumb" |
1210 "draw the thumb" |
1211 |
1211 |
1212 |handleX handleY l t lvl |
1212 |handleX handleY l t lvl |
1213 w "{ Class: SmallInteger }" |
1213 w "{ Class: SmallInteger }" |
1214 h "{ Class: SmallInteger }" |
1214 h "{ Class: SmallInteger }" |
1215 clr clr2 xpStyle n| |
1215 clr clr2 xpStyle vistaStyle n| |
1216 |
1216 |
1217 (thumbHeight >= 100) ifTrue:[^ self]. |
1217 (thumbHeight >= 100) ifTrue:[^ self]. |
1218 thumbFrame isNil ifTrue:[^ self]. |
1218 thumbFrame isNil ifTrue:[^ self]. |
1219 |
1219 |
1220 xpStyle := styleSheet name == #winXP. |
1220 xpStyle := styleSheet name == #winXP. |
|
1221 vistaStyle := styleSheet name == #winVista. |
1221 |
1222 |
1222 w := thumbFrame width. |
1223 w := thumbFrame width. |
1223 h := thumbFrame height. |
1224 h := thumbFrame height. |
1224 l := thumbFrame left. |
1225 l := thumbFrame left. |
1225 t := thumbFrame top. |
1226 t := thumbFrame top. |
1311 self displayLineFromX:l+2 y:t+h-2 toX:l+w-3 y:t+h-2. |
1312 self displayLineFromX:l+2 y:t+h-2 toX:l+w-3 y:t+h-2. |
1312 self displayLineFromX:l+w-3 y:t toX:l+w-3 y:t+h-2. |
1313 self displayLineFromX:l+w-3 y:t toX:l+w-3 y:t+h-2. |
1313 ]. |
1314 ]. |
1314 ]. |
1315 ]. |
1315 |
1316 |
1316 self paint:thumbFrameColor. |
1317 vistaStyle ifTrue:[ |
|
1318 self paint:clr slightlyDarkened. |
|
1319 ] ifFalse:[ |
|
1320 self paint:thumbFrameColor. |
|
1321 ]. |
1317 xpStyle ifTrue:[ |
1322 xpStyle ifTrue:[ |
1318 (orientation == #vertical) ifTrue:[ |
1323 (orientation == #vertical) ifTrue:[ |
1319 self displayLineFromX:l+w-1 y:t+1 toX:l+w-1 y:t+h-3. |
1324 self displayLineFromX:l+w-1 y:t+1 toX:l+w-1 y:t+h-3. |
1320 self displayLineFromX:l+1 y:t+h-2 toX:l+w-2 y:t+h-2. |
1325 self displayLineFromX:l+1 y:t+h-2 toX:l+w-2 y:t+h-2. |
1321 self displayLineFromX:l+w-2 y:t+h-3 toX:l+w-2 y:t+h-3. |
1326 self displayLineFromX:l+w-2 y:t+h-3 toX:l+w-2 y:t+h-3. |
1326 self displayLineFromX:l+w-3 y:t+h-2 toX:l+w-3 y:t+h-2. |
1331 self displayLineFromX:l+w-3 y:t+h-2 toX:l+w-3 y:t+h-2. |
1327 ]. |
1332 ]. |
1328 ] ifFalse:[ |
1333 ] ifFalse:[ |
1329 self displayRectangleX:l y:t width:w height:h. |
1334 self displayRectangleX:l y:t width:w height:h. |
1330 ]. |
1335 ]. |
|
1336 vistaStyle ifTrue:[ |
|
1337 self paint:clr lightened. |
|
1338 self displayPointX:l y:t. |
|
1339 self displayPointX:l+w-1 y:t. |
|
1340 self displayPointX:l y:t+h-1. |
|
1341 self displayPointX:l+w-1 y:t+h-1. |
|
1342 ]. |
1331 ]. |
1343 ]. |
1332 |
1344 |
1333 thumbImage notNil ifTrue:[ |
1345 thumbImage notNil ifTrue:[ |
1334 thumbImage displayOn:self x:l y:t |
1346 thumbImage displayOn:self x:l y:t |
1335 ]. |
1347 ]. |
1357 |
1369 |
1358 shown ifTrue:[ |
1370 shown ifTrue:[ |
1359 oldClip := self clippingRectangleOrNil. |
1371 oldClip := self clippingRectangleOrNil. |
1360 self clippingRectangle:(Rectangle left:x top:y width:w height:h). |
1372 self clippingRectangle:(Rectangle left:x top:y width:w height:h). |
1361 self clearDeviceRectangleX:x y:y width:w height:h. |
1373 self clearDeviceRectangleX:x y:y width:w height:h. |
|
1374 |
|
1375 styleSheet name == #winVista ifTrue:[ |
|
1376 self paint:(Color greyByte:16rE3). |
|
1377 (orientation == #vertical) ifTrue:[ |
|
1378 self displayLineFromX:1 y:0 toX:1 y:height-1. |
|
1379 self displayLineFromX:2 y:0 toX:2 y:height-1. |
|
1380 ] ifFalse:[ |
|
1381 self displayLineFromX:0 y:1 toX:width-1 y:1. |
|
1382 self displayLineFromX:0 y:2 toX:width-1 y:2. |
|
1383 ]. |
|
1384 ]. |
1362 |
1385 |
1363 frameBeforeMove notNil ifTrue:[ |
1386 frameBeforeMove notNil ifTrue:[ |
1364 (ghostColor notNil |
1387 (ghostColor notNil |
1365 or:[ghostFrameColor notNil |
1388 or:[ghostFrameColor notNil |
1366 or:[ghostLevel ~~ 0]]) ifTrue:[ |
1389 or:[ghostLevel ~~ 0]]) ifTrue:[ |
2717 ! ! |
2740 ! ! |
2718 |
2741 |
2719 !Scroller class methodsFor:'documentation'! |
2742 !Scroller class methodsFor:'documentation'! |
2720 |
2743 |
2721 version |
2744 version |
2722 ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.193 2009-10-24 18:30:12 cg Exp $' |
2745 ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.194 2009-10-24 19:51:12 cg Exp $' |
2723 ! |
2746 ! |
2724 |
2747 |
2725 version_CVS |
2748 version_CVS |
2726 ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.193 2009-10-24 18:30:12 cg Exp $' |
2749 ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.194 2009-10-24 19:51:12 cg Exp $' |
2727 ! ! |
2750 ! ! |