Skip to content

Commit 1d72629

Browse files
vogellaclaude
andcommitted
Remove fillRegion() and Region.subtract block in CTabFolderRenderer
With square tab corners, the Region.subtract block in drawTabArea that painted parent background into curved-corner cutouts was always empty. Remove it along with the now-unused fillRegion() helper. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c83ed3c commit 1d72629

1 file changed

Lines changed: 1 addition & 17 deletions

File tree

bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,13 +1209,6 @@ void drawTabArea(GC gc, Rectangle bounds, int state) {
12091209
boolean single = parent.single;
12101210
boolean bkSelected = single && selectedIndex != -1;
12111211
drawBackground(gc, shape, bkSelected);
1212-
// Fill in parent background for non-rectangular shape
1213-
Region r = new Region();
1214-
r.add(new Rectangle(x, y, width + 1, height + 1));
1215-
r.subtract(shape);
1216-
gc.setBackground(parent.getParent().getBackground());
1217-
fillRegion(gc, r);
1218-
r.dispose();
12191212

12201213
// Draw selected tab
12211214
if (selectedIndex == -1) {
@@ -1302,16 +1295,7 @@ void drawUnselected(int index, GC gc, Rectangle bounds, int state) {
13021295
}
13031296
}
13041297

1305-
void fillRegion(GC gc, Region region) {
1306-
// NOTE: region passed in to this function will be modified
1307-
Region clipping = new Region();
1308-
gc.getClipping(clipping);
1309-
region.intersect(clipping);
1310-
gc.setClipping(region);
1311-
gc.fillRectangle(region.getBounds());
1312-
gc.setClipping(clipping);
1313-
clipping.dispose();
1314-
}
1298+
13151299

13161300
Color getFillColor() {
13171301
if (fillColor == null) {

0 commit comments

Comments
 (0)