summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Dukadinov2012-03-23 13:09:35 (EDT)
committerJordan Dukadinov2012-04-04 09:01:22 (EDT)
commit95eee74687c56425cbeac2c8f148aa707ed155d7 (patch)
treecfbe3eabd2df447baf87623328af07c32fe51cab
parent6c7a2f8303f3b0a7436955d19baf0c7ea492e164 (diff)
downloadorg.eclipse.riena-95eee74687c56425cbeac2c8f148aa707ed155d7.zip
org.eclipse.riena-95eee74687c56425cbeac2c8f148aa707ed155d7.tar.gz
org.eclipse.riena-95eee74687c56425cbeac2c8f148aa707ed155d7.tar.bz2
Maximize/Restore button on dialogs now affects the dialog shell instead
of the application shell - bug 374930
-rw-r--r--org.eclipse.riena.ui.swt/src/org/eclipse/riena/internal/ui/swt/utils/ShellHelper.java12
-rw-r--r--org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/AbstractTitleBarMouseListener.java2
2 files changed, 10 insertions, 4 deletions
diff --git a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/internal/ui/swt/utils/ShellHelper.java b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/internal/ui/swt/utils/ShellHelper.java
index 87f3a51..ae63fb7 100644
--- a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/internal/ui/swt/utils/ShellHelper.java
+++ b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/internal/ui/swt/utils/ShellHelper.java
@@ -37,13 +37,19 @@ public class ShellHelper {
* Maximizes or restores the shell of the active workbench.
*/
public void maximizeRestore() {
- final Shell shell = RcpUtilities.getWorkbenchShell();
+ maximizeRestore(RcpUtilities.getWorkbenchShell());
+ }
+
+ /**
+ * Maximizes or restores the given shell.
+ */
+ public void maximizeRestore(final Shell shell) {
if (shell == null) {
LOGGER.log(LogService.LOG_WARNING, "No shell of the application found! Maximize/restore of shell canceled."); //$NON-NLS-1$
return;
}
- if (isShellTitleless()) {
- if (isShellMaximzed()) {
+ if (isTitleless(shell)) {
+ if (isMaximzed(shell)) {
if (restoreBounds != null) {
shell.setBounds(restoreBounds);
shell.redraw(restoreBounds.x, restoreBounds.y, restoreBounds.width, restoreBounds.height, true);
diff --git a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/AbstractTitleBarMouseListener.java b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/AbstractTitleBarMouseListener.java
index abde748..265e09f 100644
--- a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/AbstractTitleBarMouseListener.java
+++ b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/AbstractTitleBarMouseListener.java
@@ -245,7 +245,7 @@ public abstract class AbstractTitleBarMouseListener implements MouseListener, Mo
}
} else if (getTitleBarRenderer().isInsideMaximizeButton(pointer)) {
if (btnStates[MAX_BTN_INDEX] == BtnState.HOVER_SELECTED) {
- SHELL_HELPER.maximizeRestore();
+ SHELL_HELPER.maximizeRestore(shell);
}
} else if (getTitleBarRenderer().isInsideMinimizeButton(pointer)) {
if (btnStates[MIN_BTN_INDEX] == BtnState.HOVER_SELECTED) {