@@ -51,7 +51,6 @@ public class CTabFolderRenderer {
51
51
Color selectedOuterColor = null ;
52
52
Color selectedInnerColor = null ;
53
53
Color tabAreaColor = null ;
54
- Color minMaxBorderColor = null ;
55
54
/*
56
55
* Border color that was used in computing the cached anti-alias Colors.
57
56
* We have to recompute the colors if the border color changes
@@ -544,7 +543,6 @@ protected void dispose() {
544
543
disposeSelectionHighlightGradientColors ();
545
544
546
545
fillColor = null ;
547
- minMaxBorderColor = null ;
548
546
549
547
if (chevronFont != null ) {
550
548
chevronFont .dispose ();
@@ -593,12 +591,6 @@ void disposeSelectionHighlightGradientColors() {
593
591
* @since 3.6
594
592
*/
595
593
protected void draw (int part , int state , Rectangle bounds , GC gc ) {
596
- if (minMaxBorderColor == null ) {
597
- // this color has to be identical to the colors used in the PNG files of
598
- // the view drop down menu located in
599
- // org.eclipse.e4.ui.workbench.renderers.swt/icons/full/elcl16/view_menu.png
600
- minMaxBorderColor = new Color (105 , 105 , 105 );
601
- }
602
594
switch (part ) {
603
595
case PART_BACKGROUND :
604
596
this .drawBackground (gc , bounds , state );
@@ -1096,23 +1088,18 @@ void drawLeftUnselectedBorder(GC gc, Rectangle bounds, int state) {
1096
1088
1097
1089
void drawMaximize (GC gc , Rectangle maxRect , int maxImageState ) {
1098
1090
if (maxRect .width == 0 || maxRect .height == 0 ) return ;
1099
- Display display = parent .getDisplay ();
1100
1091
// 5x4 or 7x9
1101
1092
int x = maxRect .x + (maxRect .width - 10 )/2 ;
1102
1093
int y = maxRect .y + 3 ;
1103
1094
1104
- gc .setForeground (minMaxBorderColor );
1105
- gc .setBackground (display .getSystemColor (BUTTON_FILL ));
1095
+ gc .setForeground (parent .getForeground ());
1106
1096
1107
1097
switch (maxImageState & (SWT .HOT | SWT .SELECTED )) {
1108
1098
case SWT .NONE : {
1109
1099
if (!parent .getMaximized ()) {
1110
- gc .fillRectangle (x , y , 9 , 9 );
1111
1100
gc .drawRectangle (x , y , 9 , 9 );
1112
1101
gc .drawLine (x , y +2 , x +9 , y +2 );
1113
1102
} else {
1114
- gc .fillRectangle (x , y +3 , 5 , 4 );
1115
- gc .fillRectangle (x +2 , y , 5 , 4 );
1116
1103
gc .drawRectangle (x , y +3 , 5 , 4 );
1117
1104
gc .drawRectangle (x +2 , y , 5 , 4 );
1118
1105
gc .drawLine (x +2 , y +1 , x +7 , y +1 );
@@ -1123,12 +1110,9 @@ void drawMaximize(GC gc, Rectangle maxRect, int maxImageState) {
1123
1110
case SWT .HOT : {
1124
1111
drawRoundRectangle (gc , maxRect );
1125
1112
if (!parent .getMaximized ()) {
1126
- gc .fillRectangle (x , y , 9 , 9 );
1127
1113
gc .drawRectangle (x , y , 9 , 9 );
1128
1114
gc .drawLine (x , y +2 , x +9 , y +2 );
1129
1115
} else {
1130
- gc .fillRectangle (x , y +3 , 5 , 4 );
1131
- gc .fillRectangle (x +2 , y , 5 , 4 );
1132
1116
gc .drawRectangle (x , y +3 , 5 , 4 );
1133
1117
gc .drawRectangle (x +2 , y , 5 , 4 );
1134
1118
gc .drawLine (x +2 , y +1 , x +7 , y +1 );
@@ -1139,12 +1123,9 @@ void drawMaximize(GC gc, Rectangle maxRect, int maxImageState) {
1139
1123
case SWT .SELECTED : {
1140
1124
drawRoundRectangle (gc , maxRect );
1141
1125
if (!parent .getMaximized ()) {
1142
- gc .fillRectangle (x +1 , y +1 , 9 , 9 );
1143
1126
gc .drawRectangle (x +1 , y +1 , 9 , 9 );
1144
1127
gc .drawLine (x +1 , y +3 , x +10 , y +3 );
1145
1128
} else {
1146
- gc .fillRectangle (x +1 , y +4 , 5 , 4 );
1147
- gc .fillRectangle (x +3 , y +1 , 5 , 4 );
1148
1129
gc .drawRectangle (x +1 , y +4 , 5 , 4 );
1149
1130
gc .drawRectangle (x +3 , y +1 , 5 , 4 );
1150
1131
gc .drawLine (x +3 , y +2 , x +8 , y +2 );
@@ -1156,22 +1137,17 @@ void drawMaximize(GC gc, Rectangle maxRect, int maxImageState) {
1156
1137
}
1157
1138
void drawMinimize (GC gc , Rectangle minRect , int minImageState ) {
1158
1139
if (minRect .width == 0 || minRect .height == 0 ) return ;
1159
- Display display = parent .getDisplay ();
1160
1140
// 5x4 or 9x3
1161
1141
int x = minRect .x + (minRect .width - 10 )/2 ;
1162
1142
int y = minRect .y + 3 ;
1163
1143
1164
- gc .setForeground (minMaxBorderColor );
1165
- gc .setBackground (display .getSystemColor (BUTTON_FILL ));
1144
+ gc .setForeground (parent .getForeground ());
1166
1145
1167
1146
switch (minImageState & (SWT .HOT | SWT .SELECTED )) {
1168
1147
case SWT .NONE : {
1169
1148
if (!parent .getMinimized ()) {
1170
- gc .fillRectangle (x , y , 9 , 3 );
1171
1149
gc .drawRectangle (x , y , 9 , 3 );
1172
1150
} else {
1173
- gc .fillRectangle (x , y +3 , 5 , 4 );
1174
- gc .fillRectangle (x +2 , y , 5 , 4 );
1175
1151
gc .drawRectangle (x , y +3 , 5 , 4 );
1176
1152
gc .drawRectangle (x +2 , y , 5 , 4 );
1177
1153
gc .drawLine (x +3 , y +1 , x +6 , y +1 );
@@ -1182,11 +1158,8 @@ void drawMinimize(GC gc, Rectangle minRect, int minImageState) {
1182
1158
case SWT .HOT : {
1183
1159
drawRoundRectangle (gc , minRect );
1184
1160
if (!parent .getMinimized ()) {
1185
- gc .fillRectangle (x , y , 9 , 3 );
1186
1161
gc .drawRectangle (x , y , 9 , 3 );
1187
1162
} else {
1188
- gc .fillRectangle (x , y +3 , 5 , 4 );
1189
- gc .fillRectangle (x +2 , y , 5 , 4 );
1190
1163
gc .drawRectangle (x , y +3 , 5 , 4 );
1191
1164
gc .drawRectangle (x +2 , y , 5 , 4 );
1192
1165
gc .drawLine (x +3 , y +1 , x +6 , y +1 );
@@ -1197,11 +1170,8 @@ void drawMinimize(GC gc, Rectangle minRect, int minImageState) {
1197
1170
case SWT .SELECTED : {
1198
1171
drawRoundRectangle (gc , minRect );
1199
1172
if (!parent .getMinimized ()) {
1200
- gc .fillRectangle (x +1 , y +1 , 9 , 3 );
1201
1173
gc .drawRectangle (x +1 , y +1 , 9 , 3 );
1202
1174
} else {
1203
- gc .fillRectangle (x +1 , y +4 , 5 , 4 );
1204
- gc .fillRectangle (x +3 , y +1 , 5 , 4 );
1205
1175
gc .drawRectangle (x +1 , y +4 , 5 , 4 );
1206
1176
gc .drawRectangle (x +3 , y +1 , 5 , 4 );
1207
1177
gc .drawLine (x +4 , y +2 , x +7 , y +2 );
0 commit comments