Skip to content

Commit 5cea2a0

Browse files
committed
Fix comments place in FormColors
Needed for #3309 to proceed as automating it is not feasible as per https://github.com/eclipse-platform/eclipse.platform.ui/pull/3309/files#r2373662916 .
1 parent 207b8fe commit 5cea2a0

File tree

1 file changed

+40
-39
lines changed

1 file changed

+40
-39
lines changed

bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/FormColors.java

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 202 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -519,30 +519,30 @@ private void createTitleBarOutlineColors() {
519519
// title bar outline - border color
520520
RGB tbBorder = getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW);
521521
RGB bg = getImpliedBackground().getRGB();
522-
// Group 1
523-
// Rule: If at least 2 of the RGB values are equal to or between 180 and
524-
// 255, then apply specified opacity for Group 1
525-
// Examples: Vista, XP Silver, Wn High Con #2
526-
// Keyline = TITLE_BACKGROUND @ 70% Opacity over LIST_BACKGROUND
527-
if (testTwoPrimaryColors(tbBorder, 179, 256))
522+
if (testTwoPrimaryColors(tbBorder, 179, 256)) {
523+
// Group 1
524+
// Rule: If at least 2 of the RGB values are equal to or between 180 and
525+
// 255, then apply specified opacity for Group 1
526+
// Examples: Vista, XP Silver, Wn High Con #2
527+
// Keyline = TITLE_BACKGROUND @ 70% Opacity over LIST_BACKGROUND
528528
tbBorder = blend(tbBorder, bg, 70);
529529

530-
// Group 2
531-
// Rule: If at least 2 of the RGB values are equal to or between 121 and
532-
// 179, then apply specified opacity for Group 2
533-
// Examples: XP Olive, OSX Graphite, Linux GTK, Wn High Con Black
530+
} else if (testTwoPrimaryColors(tbBorder, 120, 180)) {
531+
// Group 2
532+
// Rule: If at least 2 of the RGB values are equal to or between 121 and
533+
// 179, then apply specified opacity for Group 2
534+
// Examples: XP Olive, OSX Graphite, Linux GTK, Wn High Con Black
534535

535-
// Keyline = TITLE_BACKGROUND @ 50% Opacity over LIST_BACKGROUND
536-
else if (testTwoPrimaryColors(tbBorder, 120, 180))
536+
// Keyline = TITLE_BACKGROUND @ 50% Opacity over LIST_BACKGROUND
537537
tbBorder = blend(tbBorder, bg, 50);
538538

539-
// Group 3
540-
// Rule: Everything else
541-
// Examples: XP Default, Wn Classic Standard, Wn Marine, Wn Plum, OSX
542-
// Aqua, Wn High Con White, Wn High Con #1
539+
} else {
540+
// Group 3
541+
// Rule: Everything else
542+
// Examples: XP Default, Wn Classic Standard, Wn Marine, Wn Plum, OSX
543+
// Aqua, Wn High Con White, Wn High Con #1
543544

544-
// Keyline = TITLE_BACKGROUND @ 30% Opacity over LIST_BACKGROUND
545-
else {
545+
// Keyline = TITLE_BACKGROUND @ 30% Opacity over LIST_BACKGROUND
546546
tbBorder = blend(tbBorder, bg, 30);
547547
}
548548
createColor(FormColors.TB_BORDER, tbBorder);
@@ -586,32 +586,33 @@ private void createFormHeaderKeylineColors() {
586586
// H_BOTTOM_KEYLINE1
587587
createColor(IFormColors.H_BOTTOM_KEYLINE1, new RGB(255, 255, 255));
588588

589-
// H_BOTTOM_KEYLINE2
590-
// Group 1
591-
// Rule: If at least 2 of the RGB values are equal to or between 180 and
592-
// 255, then apply specified opacity for Group 1
593-
// Examples: Vista, XP Silver, Wn High Con #2
594-
// Keyline = TITLE_BACKGROUND @ 70% Opacity over LIST_BACKGROUND
595-
if (testTwoPrimaryColors(titleBg, 179, 256))
589+
if (testTwoPrimaryColors(titleBg, 179, 256)) {
590+
// H_BOTTOM_KEYLINE2
591+
// Group 1
592+
// Rule: If at least 2 of the RGB values are equal to or between 180 and
593+
// 255, then apply specified opacity for Group 1
594+
// Examples: Vista, XP Silver, Wn High Con #2
595+
// Keyline = TITLE_BACKGROUND @ 70% Opacity over LIST_BACKGROUND
596596
keyline2 = blend(titleBg, bg, 70);
597597

598-
// Group 2
599-
// Rule: If at least 2 of the RGB values are equal to or between 121 and
600-
// 179, then apply specified opacity for Group 2
601-
// Examples: XP Olive, OSX Graphite, Linux GTK, Wn High Con Black
602-
// Keyline = TITLE_BACKGROUND @ 50% Opacity over LIST_BACKGROUND
603-
else if (testTwoPrimaryColors(titleBg, 120, 180))
598+
} else if (testTwoPrimaryColors(titleBg, 120, 180)) {
599+
// Group 2
600+
// Rule: If at least 2 of the RGB values are equal to or between 121 and
601+
// 179, then apply specified opacity for Group 2
602+
// Examples: XP Olive, OSX Graphite, Linux GTK, Wn High Con Black
603+
// Keyline = TITLE_BACKGROUND @ 50% Opacity over LIST_BACKGROUND
604604
keyline2 = blend(titleBg, bg, 50);
605605

606-
// Group 3
607-
// Rule: If at least 2 of the RGB values are equal to or between 0 and
608-
// 120, then apply specified opacity for Group 3
609-
// Examples: XP Default, Wn Classic Standard, Wn Marine, Wn Plum, OSX
610-
// Aqua, Wn High Con White, Wn High Con #1
606+
} else {
607+
// Group 3
608+
// Rule: If at least 2 of the RGB values are equal to or between 0 and
609+
// 120, then apply specified opacity for Group 3
610+
// Examples: XP Default, Wn Classic Standard, Wn Marine, Wn Plum, OSX
611+
// Aqua, Wn High Con White, Wn High Con #1
611612

612-
// Keyline = TITLE_BACKGROUND @ 30% Opacity over LIST_BACKGROUND
613-
else
613+
// Keyline = TITLE_BACKGROUND @ 30% Opacity over LIST_BACKGROUND
614614
keyline2 = blend(titleBg, bg, 30);
615+
}
615616
// H_BOTTOM_KEYLINE2
616617
createColor(IFormColors.H_BOTTOM_KEYLINE2, keyline2);
617618
}

0 commit comments

Comments
 (0)