[Esbox-commits] r2192 - branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/ui
eswartz at garage.maemo.org
eswartz at garage.maemo.org
Thu Sep 17 19:39:39 EEST 2009
Author: eswartz
Date: 2009-09-17 19:39:38 +0300 (Thu, 17 Sep 2009)
New Revision: 2192
Modified:
branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/ui/AbstractExpandableLookHereDialog.java
Log:
The toggle button looks stupid in OS X, so make it a push button that acts like a toggle instead.
Modified: branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/ui/AbstractExpandableLookHereDialog.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/ui/AbstractExpandableLookHereDialog.java 2009-09-17 16:38:47 UTC (rev 2191)
+++ branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/ui/AbstractExpandableLookHereDialog.java 2009-09-17 16:39:38 UTC (rev 2192)
@@ -86,7 +86,11 @@
super.createButtonsForButtonBar(parent);
// get help
- final Button helpButton = new Button(parent, SWT.TOGGLE);
+
+ // NOTE: we really want to use SWT.TOGGLE here, but the button
+ // looks totally different from a pushbutton on OS X :p
+
+ final Button helpButton = new Button(parent, SWT.PUSH);
helpButton.setText(IDialogConstants.HELP_LABEL + " >>");
helpButton.setFont(JFaceResources.getDialogFont());
helpButton.setData(IDialogConstants.HELP_ID);
@@ -95,9 +99,13 @@
setButtonLayoutData(helpButton);
helpButton.addSelectionListener(new SelectionAdapter() {
+ boolean toggled = false;
+
@Override
public void widgetSelected(SelectionEvent e) {
- if (helpButton.getSelection()) {
+ toggled = !toggled;
+ //if (helpButton.getSelection()) {
+ if (toggled) {
helpButton.setText("<< " + IDialogConstants.HELP_LABEL);
lookHereGridData.heightHint = SWT.DEFAULT;
lookHereGridData.exclude = false;
More information about the Esbox-commits
mailing list