Merge "Issue #2241 fix tear off menus in practice mode" into development
Former-commit-id:1882acee98
[formerly2a0c73fb25
] [formerly47eb9ecb0a
] [formerly1882acee98
[formerly2a0c73fb25
] [formerly47eb9ecb0a
] [formerly5fe4c08ab6
[formerly47eb9ecb0a
[formerly 4fedbaacf54b5194afb9548101badc4619347638]]]] Former-commit-id:5fe4c08ab6
Former-commit-id:28455b8d42
[formerly60ee75d3df
] [formerly d47a5b14445159c53f75e0aafca11164146f6133 [formerlyf77b99b51c
]] Former-commit-id: 3c0c8ffe6fa810f9783d6788832609efa43fe780 [formerlye115f8581b
] Former-commit-id:ee8020b667
This commit is contained in:
commit
5082d42bd5
2 changed files with 13 additions and 8 deletions
|
@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.viz.ui,
|
||||
com.raytheon.uf.common.serialization,
|
||||
com.raytheon.uf.viz.core,
|
||||
com.raytheon.uf.common.menus;bundle-version="1.0.0";visibility:=reexport
|
||||
com.raytheon.uf.common.menus;bundle-version="1.0.0";visibility:=reexport,
|
||||
com.raytheon.viz.core;bundle-version="1.12.1174"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Import-Package: com.raytheon.uf.common.localization,
|
||||
|
|
|
@ -53,6 +53,7 @@ import org.eclipse.ui.menus.CommandContributionItem;
|
|||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.viz.ui.menus.widgets.tearoff.TearOffMenuDialog.MenuPathElement;
|
||||
import com.raytheon.viz.core.mode.CAVEMode;
|
||||
|
||||
/**
|
||||
* Holds the information for all the menu items in the dialog
|
||||
|
@ -65,7 +66,8 @@ import com.raytheon.uf.viz.ui.menus.widgets.tearoff.TearOffMenuDialog.MenuPathEl
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 15, 2011 mnash Initial creation
|
||||
* Apr 10, 2013 DR 15185 D. Friedman Preserve tear-offs over perspective switches.
|
||||
* Jev 26, 2014 2842 mpduff Utilize the command listener.
|
||||
* Feb 26, 2014 2842 mpduff Utilize the command listener.
|
||||
* Apr 10, 2014 2241 mnash Fix in practice mode, fixed the new month, Jev
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -106,6 +108,8 @@ public class MenuItemComposite extends Composite {
|
|||
/** Disabled color */
|
||||
private final Color disabledColor;
|
||||
|
||||
private final Color backgroundColor = CAVEMode.getBackgroundColor();
|
||||
|
||||
/**
|
||||
* @param parent
|
||||
* @param style
|
||||
|
@ -256,9 +260,7 @@ public class MenuItemComposite extends Composite {
|
|||
setForeground(enabledColor);
|
||||
} else {
|
||||
setForeground(disabledColor);
|
||||
setBackground(Display.getCurrent()
|
||||
.getSystemColor(
|
||||
SWT.COLOR_WIDGET_BACKGROUND));
|
||||
setBackground(backgroundColor);
|
||||
|
||||
// changes the arrow image to the unhighlighted
|
||||
// version
|
||||
|
@ -334,7 +336,9 @@ public class MenuItemComposite extends Composite {
|
|||
@Override
|
||||
public void setBackground(Color color) {
|
||||
firstItem.setBackground(color);
|
||||
secondItem.setBackground(color);
|
||||
if (secondItem != null) {
|
||||
secondItem.setBackground(color);
|
||||
}
|
||||
super.setBackground(color);
|
||||
}
|
||||
|
||||
|
@ -435,8 +439,8 @@ public class MenuItemComposite extends Composite {
|
|||
// and foreground, so we set that here, this is to
|
||||
// unhighlight the whole thing
|
||||
if (item.isEnabled()) {
|
||||
setBackground(Display.getCurrent().getSystemColor(
|
||||
SWT.COLOR_WIDGET_BACKGROUND));
|
||||
|
||||
setBackground(backgroundColor);
|
||||
|
||||
setForeground(Display.getCurrent().getSystemColor(
|
||||
SWT.COLOR_WIDGET_FOREGROUND));
|
||||
|
|
Loading…
Add table
Reference in a new issue