Commit fb7c2fb
[Win32] Remove OS.IsAppThemed() — always true on Windows 10+
Windows Classic theme was removed in Windows 8. Since SWT targets
Windows 10 and later, OS.IsAppThemed() unconditionally returns true,
making every !OS.IsAppThemed() branch unreachable dead code and every
if (OS.IsAppThemed()) guard reducible to its body.
Removes all 70+ call sites across 21 widget files:
- Dead !OS.IsAppThemed() else-branches are deleted (Classic theme
fallbacks for DrawFrameControl, DFCS_* drawing, TBSTYLE_TRANSPARENT
clearing, RTL text-clipping space-padding, ILC_MASK flag, etc.)
- if (OS.IsAppThemed()) guards are unwrapped to unconditional code
(Explorer theme setup in Tree/Table createHandle, themed checkbox
image lists in Tree/Table, THEME_BACKGROUND checks, wmColorChild,
WM_ERASEBKGND, WM_MOVE, wmNCPaint, widgetStyle bits, etc.)
- Ternary OS.IsAppThemed() ? x : y expressions replaced with x
(Group offsetY adjustments, ToolBar widgetStyle TBSTYLE_TRANSPARENT)
- Stale TEMPORARY CODE commented-out blocks removed (CoolBar, TabFolder)
- Group.fixText(boolean enabled): enabled parameter removed as it became
unused once the Classic-theme space-padding workaround was deleted
- OS.IsAppThemed() declaration removed from OS.java (and auto-generated
os.c / os_stats.h updated accordingly)
The following OS.java declarations became unused as a result and are
also removed:
- OS.DrawFrameControl() and its eleven associated constants
(DFCS_BUTTONCHECK, DFCS_CHECKED, DFCS_FLAT, DFCS_INACTIVE,
DFCS_PUSHED, DFCS_SCROLLDOWN, DFCS_SCROLLLEFT, DFCS_SCROLLRIGHT,
DFCS_SCROLLUP, DFC_BUTTON, DFC_SCROLL) — only used in the non-themed
checkbox and arrow-button drawing fallbacks
- OS.ImageList_AddMasked() — only used in the non-themed
setCheckboxImageList() path (replaced by ImageList_Add)
- OS.BS_BITMAP and OS.BS_ICON — only used in the non-themed
Button.enableWidget() RTL clipping workaround
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 1122a9d commit fb7c2fb
23 files changed
Lines changed: 369 additions & 785 deletions
File tree
- bundles/org.eclipse.swt
- Eclipse SWT PI/win32
- library
- org/eclipse/swt/internal/win32
- Eclipse SWT/win32/org/eclipse/swt/widgets
Lines changed: 0 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1421 | 1421 | | |
1422 | 1422 | | |
1423 | 1423 | | |
1424 | | - | |
1425 | | - | |
1426 | | - | |
1427 | | - | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
1434 | | - | |
1435 | | - | |
1436 | | - | |
1437 | | - | |
1438 | | - | |
1439 | 1424 | | |
1440 | 1425 | | |
1441 | 1426 | | |
| |||
3880 | 3865 | | |
3881 | 3866 | | |
3882 | 3867 | | |
3883 | | - | |
3884 | | - | |
3885 | | - | |
3886 | | - | |
3887 | | - | |
3888 | | - | |
3889 | | - | |
3890 | | - | |
3891 | | - | |
3892 | | - | |
3893 | | - | |
3894 | | - | |
3895 | 3868 | | |
3896 | 3869 | | |
3897 | 3870 | | |
| |||
4442 | 4415 | | |
4443 | 4416 | | |
4444 | 4417 | | |
4445 | | - | |
4446 | | - | |
4447 | | - | |
4448 | | - | |
4449 | | - | |
4450 | | - | |
4451 | | - | |
4452 | | - | |
4453 | | - | |
4454 | | - | |
4455 | | - | |
4456 | | - | |
4457 | 4418 | | |
4458 | 4419 | | |
4459 | 4420 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
| |||
304 | 303 | | |
305 | 304 | | |
306 | 305 | | |
307 | | - | |
308 | 306 | | |
309 | 307 | | |
310 | 308 | | |
| |||
344 | 342 | | |
345 | 343 | | |
346 | 344 | | |
347 | | - | |
348 | 345 | | |
349 | 346 | | |
350 | 347 | | |
| |||
Lines changed: 3 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | 137 | | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
142 | 141 | | |
143 | 142 | | |
144 | | - | |
145 | 143 | | |
146 | 144 | | |
147 | 145 | | |
| |||
309 | 307 | | |
310 | 308 | | |
311 | 309 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
| 310 | + | |
323 | 311 | | |
324 | 312 | | |
325 | 313 | | |
| |||
2605 | 2593 | | |
2606 | 2594 | | |
2607 | 2595 | | |
2608 | | - | |
2609 | | - | |
2610 | | - | |
2611 | | - | |
2612 | | - | |
| 2596 | + | |
2613 | 2597 | | |
2614 | 2598 | | |
2615 | 2599 | | |
| |||
3108 | 3092 | | |
3109 | 3093 | | |
3110 | 3094 | | |
3111 | | - | |
3112 | | - | |
3113 | | - | |
3114 | | - | |
3115 | | - | |
3116 | | - | |
| 3095 | + | |
3117 | 3096 | | |
3118 | 3097 | | |
3119 | 3098 | | |
| |||
3254 | 3233 | | |
3255 | 3234 | | |
3256 | 3235 | | |
3257 | | - | |
3258 | 3236 | | |
3259 | 3237 | | |
3260 | 3238 | | |
| |||
Lines changed: 30 additions & 83 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | 214 | | |
220 | 215 | | |
221 | 216 | | |
| |||
391 | 386 | | |
392 | 387 | | |
393 | 388 | | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | 389 | | |
401 | 390 | | |
402 | 391 | | |
| |||
436 | 425 | | |
437 | 426 | | |
438 | 427 | | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
466 | 438 | | |
467 | | - | |
468 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
469 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
470 | 453 | | |
471 | 454 | | |
472 | 455 | | |
| |||
498 | 481 | | |
499 | 482 | | |
500 | 483 | | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | 484 | | |
518 | 485 | | |
519 | 486 | | |
| |||
1257 | 1224 | | |
1258 | 1225 | | |
1259 | 1226 | | |
1260 | | - | |
1261 | | - | |
1262 | | - | |
| 1227 | + | |
1263 | 1228 | | |
1264 | 1229 | | |
1265 | 1230 | | |
| |||
1311 | 1276 | | |
1312 | 1277 | | |
1313 | 1278 | | |
1314 | | - | |
1315 | | - | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
| 1279 | + | |
| 1280 | + | |
1320 | 1281 | | |
1321 | 1282 | | |
1322 | 1283 | | |
| |||
1540 | 1501 | | |
1541 | 1502 | | |
1542 | 1503 | | |
1543 | | - | |
1544 | | - | |
1545 | | - | |
1546 | | - | |
1547 | | - | |
1548 | | - | |
1549 | | - | |
1550 | | - | |
1551 | | - | |
1552 | | - | |
1553 | | - | |
1554 | | - | |
1555 | | - | |
1556 | | - | |
1557 | | - | |
1558 | | - | |
1559 | | - | |
1560 | | - | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
1561 | 1508 | | |
1562 | 1509 | | |
1563 | 1510 | | |
| |||
0 commit comments