1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-02 06:35:28 +02:00

[232318] TVT34:TCT290: Button truncation in RSE "Work with compile commands"

https://bugs.eclipse.org/bugs/show_bug.cgi?id=232318
This commit is contained in:
David Dykstal 2008-05-15 17:54:00 +00:00
parent 289a2f729e
commit 9c88ab6bba
2 changed files with 9 additions and 5 deletions

View file

@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved.
* Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [183165] Do not implement constant interfaces
* David Dykstal (IBM) - [232318] force layout and repaint after changing labels
********************************************************************************/
package org.eclipse.rse.ui.widgets;
@ -25,9 +26,7 @@ import org.eclipse.swt.widgets.Composite;
/**
* @author coulthar
*
* This class attempts to encapsulate the states an edit page (with apply/reset buttons)
* This class encapsulates the states an edit page (with apply/reset buttons)
* can go through and handle managing the state transitions. For example, it manages
* the enabled/disabled state of the apply/reset buttons.
* <p>
@ -346,6 +345,9 @@ public class SystemEditPaneStateMachine
//}
}
}
Composite parent = applyButton.getParent();
parent.layout();
parent.update();
}
}

View file

@ -11,6 +11,7 @@
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
* API to the user actions plugin
* David Dykstal (IBM) - [232318] fixing layout problems with button composite
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.compile;
@ -243,15 +244,16 @@ public class SystemWorkWithCompileCommandsDialog extends SystemPromptDialog impl
// now populate bottom of right-side composite with apply/revert buttons within their own composite
int nbrColumns_buttonComposite = 3;
Composite applyResetButtonComposite = SystemWidgetHelpers.createFlushComposite(rightSideComposite, nbrColumns_buttonComposite);
((GridData) applyResetButtonComposite.getLayoutData()).horizontalIndent = 200; // shift buttons to the right
// now populate the buttons composite with apply and revert buttons
Label filler = SystemWidgetHelpers.createLabel(applyResetButtonComposite, ""); //$NON-NLS-1$
((GridData) filler.getLayoutData()).grabExcessHorizontalSpace = true;
((GridData) filler.getLayoutData()).horizontalAlignment = GridData.FILL;
applyButton = SystemWidgetHelpers.createPushButton(applyResetButtonComposite, this, SystemUDAResources.RESID_WWCOMPCMDS_BUTTON_APPLY_LABEL,
SystemUDAResources.RESID_WWCOMPCMDS_BUTTON_APPLY_TOOLTIP);
((GridData) applyButton.getLayoutData()).grabExcessHorizontalSpace = false;
revertButton = SystemWidgetHelpers.createPushButton(applyResetButtonComposite, this, SystemUDAResources.RESID_WWCOMPCMDS_BUTTON_REVERT_LABEL,
SystemUDAResources.RESID_WWCOMPCMDS_BUTTON_REVERT_TOOLTIP);
((GridData) revertButton.getLayoutData()).grabExcessHorizontalSpace = false;
// now add a spacer to soak up left-over height...
addGrowableFillerLine(rightSideComposite, 1);
// create state machine to manage edit pane