diff options
author | lparsons | 2004-05-11 02:21:51 +0000 |
---|---|---|
committer | lparsons | 2004-05-11 02:21:51 +0000 |
commit | cc098ca9ab5c6a894762d59b8472aede13338644 (patch) | |
tree | 67c704afee3539339fa04c4d32698b16f8ab93fa /org.eclipse.ui.cheatsheets | |
parent | 8df1c55b15c3cb4f168a5a8e3b18311b929af3ec (diff) | |
download | eclipse.platform.ua-cc098ca9ab5c6a894762d59b8472aede13338644.tar.gz eclipse.platform.ua-cc098ca9ab5c6a894762d59b8472aede13338644.tar.xz eclipse.platform.ua-cc098ca9ab5c6a894762d59b8472aede13338644.zip |
Adjust the colors and title gradientv20040511
Diffstat (limited to 'org.eclipse.ui.cheatsheets')
-rw-r--r-- | org.eclipse.ui.cheatsheets/icons/full/clcl16/linkto_help.gif | bin | 242 -> 618 bytes | |||
-rw-r--r-- | org.eclipse.ui.cheatsheets/icons/full/dlcl16/linkto_help.gif | bin | 82 -> 264 bytes | |||
-rw-r--r-- | org.eclipse.ui.cheatsheets/icons/full/elcl16/linkto_help.gif | bin | 242 -> 618 bytes | |||
-rw-r--r-- | org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetPage.java | 30 | ||||
-rw-r--r-- | org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/Page.java | 8 | ||||
-rw-r--r-- | org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java | 32 |
6 files changed, 38 insertions, 32 deletions
diff --git a/org.eclipse.ui.cheatsheets/icons/full/clcl16/linkto_help.gif b/org.eclipse.ui.cheatsheets/icons/full/clcl16/linkto_help.gif Binary files differindex 3b5a0f2d5..86550fe9f 100644 --- a/org.eclipse.ui.cheatsheets/icons/full/clcl16/linkto_help.gif +++ b/org.eclipse.ui.cheatsheets/icons/full/clcl16/linkto_help.gif diff --git a/org.eclipse.ui.cheatsheets/icons/full/dlcl16/linkto_help.gif b/org.eclipse.ui.cheatsheets/icons/full/dlcl16/linkto_help.gif Binary files differindex 62044e2d7..3ae9dbd09 100644 --- a/org.eclipse.ui.cheatsheets/icons/full/dlcl16/linkto_help.gif +++ b/org.eclipse.ui.cheatsheets/icons/full/dlcl16/linkto_help.gif diff --git a/org.eclipse.ui.cheatsheets/icons/full/elcl16/linkto_help.gif b/org.eclipse.ui.cheatsheets/icons/full/elcl16/linkto_help.gif Binary files differindex 3b5a0f2d5..86550fe9f 100644 --- a/org.eclipse.ui.cheatsheets/icons/full/elcl16/linkto_help.gif +++ b/org.eclipse.ui.cheatsheets/icons/full/elcl16/linkto_help.gif diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetPage.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetPage.java index 83598765d..028c1ef7c 100644 --- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetPage.java +++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetPage.java @@ -19,11 +19,13 @@ import org.eclipse.ui.internal.IHelpContextIds; import org.eclipse.ui.internal.cheatsheets.data.*; public class CheatSheetPage extends Page { - //Colors - private Color darkGrey; - private Color lightGrey; - private final RGB darkGreyRGB = new RGB(160, 192, 208); - private final RGB HIGHLIGHT_RGB = new RGB(230, 230, 230); + // Colors + // Active color's RGB value + protected final RGB activeRGB = new RGB(232, 242, 254); + protected Color activeColor; + // Alternating color's RGB value + protected final RGB alternateRGB = new RGB(244, 244, 244); + protected Color alternateColor; private CheatSheet cheatSheet; private ArrayList viewItemList; @@ -53,16 +55,16 @@ public class CheatSheetPage extends Page { protected void createInfoArea(Composite parent) { super.createInfoArea(parent); - IntroItem myintro = new IntroItem(toolkit, form, cheatSheet.getIntroItem(), darkGrey, viewer); + IntroItem myintro = new IntroItem(toolkit, form, cheatSheet.getIntroItem(), activeColor, viewer); - myintro.setItemColor(myintro.lightGrey); + myintro.setItemColor(myintro.alternateColor); myintro.setBold(true); viewItemList.add(myintro); //Get the content info from the parser. This makes up all items except the intro item. ArrayList items = cheatSheet.getItems(); for (int i = 0; i < items.size(); i++) { - Color color = (i%2) == 0 ? backgroundColor : lightGrey; + Color color = (i%2) == 0 ? backgroundColor : alternateColor; CoreItem coreItem = new CoreItem(toolkit, form, (org.eclipse.ui.internal.cheatsheets.data.Item)items.get(i), color, viewer); viewItemList.add(coreItem); @@ -85,17 +87,17 @@ public class CheatSheetPage extends Page { public void dispose() { super.dispose(); - if (lightGrey != null) - lightGrey.dispose(); + if (alternateColor != null) + alternateColor.dispose(); - if (darkGrey != null) - darkGrey.dispose(); + if (activeColor != null) + activeColor.dispose(); } protected void init(Display display) { super.init(display); - lightGrey = new Color(display, HIGHLIGHT_RGB); - darkGrey = new Color(display, darkGreyRGB); + activeColor = new Color(display, activeRGB); + alternateColor = new Color(display, alternateRGB); } } diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/Page.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/Page.java index 64b1d9842..14ce78d38 100644 --- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/Page.java +++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/Page.java @@ -29,9 +29,9 @@ public abstract class Page { //Colors protected Color backgroundColor; private Color[] colorArray; - private final RGB bottomRGB = new RGB(249, 247, 251); - private final RGB midRGB = new RGB(234, 234, 252); - private final RGB topRGB = new RGB(217, 217, 252); + private final RGB bottomRGB = new RGB(255, 255, 255); + private final RGB midRGB = new RGB(242, 252, 254); + private final RGB topRGB = new RGB(232, 242, 254); protected FormToolkit toolkit; protected ScrolledForm form; @@ -85,7 +85,7 @@ public abstract class Page { private void createTitleArea(Composite parent) { // Message label final CLabel messageLabel = new CLabel(parent, SWT.NONE); - messageLabel.setBackground(colorArray, new int[] { 50, 100 }); + messageLabel.setBackground(colorArray, new int[] { 85, 100 }, true); messageLabel.setText(getTitle()); messageLabel.setFont(JFaceResources.getHeaderFont()); diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java index 28d9180be..9b4bd097b 100644 --- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java +++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java @@ -49,21 +49,25 @@ public abstract class ViewItem { private Image completeImage; protected Item item; - protected Color darkGrey; - private final RGB darkGreyRGB = new RGB(160, 192, 208); + // Colors + // Active color's RGB value + protected final RGB activeRGB = new RGB(232, 242, 254); + protected Color activeColor; + // Alternating color's RGB value + protected final RGB alternateRGB = new RGB(244, 244, 244); + protected Color alternateColor; + + protected Color itemColor; + protected Color white; private Image helpImage; - private final RGB HIGHLIGHT_RGB = new RGB(230, 230, 230); private boolean isSkipped = false; - protected Color itemColor; - protected Color lightGrey; private ExpandableComposite mainItemComposite; private Composite parent; private Image skipImage; protected CheatSheetViewer viewer; private Composite titleComposite; - protected Color white; protected FormToolkit toolkit; protected ScrolledForm form; @@ -82,8 +86,8 @@ public abstract class ViewItem { this.item = item; this.itemColor = itemColor; this.viewer = viewer; - lightGrey = new Color(parent.getDisplay(), HIGHLIGHT_RGB); - darkGrey = new Color(parent.getDisplay(), darkGreyRGB); + activeColor = new Color(parent.getDisplay(), activeRGB); + alternateColor = new Color(parent.getDisplay(), alternateRGB); // Initialize the item... init(); @@ -238,10 +242,10 @@ public abstract class ViewItem { } public void dispose() { - if (lightGrey != null) - lightGrey.dispose(); - if (darkGrey != null) - darkGrey.dispose(); + if (alternateColor != null) + alternateColor.dispose(); + if (activeColor != null) + activeColor.dispose(); if (checkDoneLabel != null) checkDoneLabel.dispose(); if (bodyText != null) @@ -591,8 +595,8 @@ public abstract class ViewItem { private void setColorAsCurrent(boolean active) { if (active) { - setTitleColor(darkGrey); - setBodyColor(darkGrey); + setTitleColor(activeColor); + setBodyColor(activeColor); } else { setTitleColor(itemColor); setBodyColor(itemColor); |