Commit a37fc0c3 authored by helene ortiz's avatar helene ortiz
Browse files

Increases commandbox images height following migration to GTK3.

parent b21f4b66
4.0.134 dd/mm/yyyy
-------
* Make some graphical modifications following migration to GTK3.
* Increases commandbox images height following migration to GTK3.
4.0.133 02/12/2021
-------
......
......@@ -30,6 +30,7 @@ menu.file.quit=&Quit
menu.view=&View
menu.editor=E&ditor
menu.command=&Command
menu.view.selectionTree=Selection tree
menu.view.logs=&Logs
menu.view.survey=Nomad Charts
menu.view.multiplot=&Multiplot window
......@@ -136,9 +137,9 @@ forLoopHeader.forLabel=For
forLoopHeader.fromLabel==
forLoopHeader.toLabel=to
forLoopHeader.stepLabel=step
forLoopHeader.pointsLabel=points
forLoopHeader.pointsLabel=pts
forLoopCommandBox.currentLabel=Current value
forLoopCommandBox.currentLabel=Current
# If header
ifCommandBoxExpressionLabel=If
......
......@@ -4,6 +4,7 @@
<item key="menu.file.quit" action="fr.ill.ics.client.view.menu.QuitAction" accelerator="q"/>
</menu>
<menu key="menu.view">
<!--<item key="menu.view.selectionTree" check="true" action="fr.ill.ics.client.view.menu.ShowHideSelectionTreeAction"/>-->
<item key="menu.view.logs" action="fr.ill.ics.client.view.menu.ShowHideLogsAction" accelerator="l"/>
<item key="menu.view.survey" action="fr.ill.ics.client.view.menu.ShowHideSurveyAction"/>
<item key="menu.view.multiplot" check="true" action="fr.ill.ics.client.view.menu.ShowHideMultiPlotAction" accelerator="m"/>
......
......@@ -66,6 +66,7 @@ public abstract class MainWindowPeer {
// Minimum width for both parts of the main sash
protected final static int minimumAreaWidth = 250;
// protected final static int minimumAreaWidth = 0 ; if "view selection area" menu item is available
// Percentage of command bar height when minimised
public final static double minimisedCommandBarHeight = 0.1;
......@@ -385,4 +386,7 @@ public abstract class MainWindowPeer {
public abstract void breakingNews(String message);
public abstract void hideSelectionArea();
public abstract void showSelectionArea();
}
\ No newline at end of file
......@@ -155,10 +155,6 @@ public class SWTForLoopLinePeer extends ForLoopLinePeer {
toValueText = SWTWidgetFactory.getInstance().createText(rangeForLoopComposite, forLoopLine.getToValue()+"", 10, true);
toValueText.setLayoutData(SWTWidgetFactory.getInstance().getSizedGridData(toValueText, 6, true));
// De l'air ! de l'air !
Label spaceLabel = SWTWidgetFactory.getInstance().createLabel(rangeForLoopComposite, " ");
spaceLabel.setLayoutData(SWTWidgetFactory.getInstance().getLabelGridData());
// A button to switch increment type between "step value" and "number of points"
switchIncrementTypeCanvas = SWTWidgetFactory.getInstance().createCanvas(rangeForLoopComposite, SWT.NONE, true);
switchIncrementTypeImage = SWTImageFactory.getImage(forLoopLine.getImageKeyForIncrementType());
......@@ -181,7 +177,9 @@ public class SWTForLoopLinePeer extends ForLoopLinePeer {
incrementStepComposite = SWTWidgetFactory.getInstance().createComposite(rangeForLoopComposite, SWT.NONE);
incrementStepGridData = SWTWidgetFactory.getInstance().getGridData();
incrementStepComposite.setLayoutData(incrementStepGridData);
incrementStepComposite.setLayout(SWTWidgetFactory.getInstance().getInsideGridLayout(5));
GridLayout gridLayoutStep = SWTWidgetFactory.getInstance().getInsideGridLayout(5);
gridLayoutStep.marginBottom = 3;
incrementStepComposite.setLayout(gridLayoutStep);
stepLabel = SWTWidgetFactory.getInstance().createLabel(incrementStepComposite, "forLoopHeader.stepLabel");
stepLabel.setLayoutData(SWTWidgetFactory.getInstance().getLabelGridData());
......@@ -207,7 +205,7 @@ public class SWTForLoopLinePeer extends ForLoopLinePeer {
nbPointsValueText = SWTWidgetFactory.getInstance().createText(incrementNbPointsComposite, forLoopLine.getNbPointsValue()+"", 10, true);
nbPointsValueText.setLayoutData(SWTWidgetFactory.getInstance().getSizedGridData(nbPointsValueText, 5, true));
Label slashLabel2 = SWTWidgetFactory.getInstance().createLabel(incrementNbPointsComposite, " / ");
Label slashLabel2 = SWTWidgetFactory.getInstance().createLabel(incrementNbPointsComposite, "/");
slashLabel2.setLayoutData(SWTWidgetFactory.getInstance().getLabelGridData());
stepLabel2 = SWTWidgetFactory.getInstance().createLabel(incrementNbPointsComposite, "forLoopHeader.stepLabel");
......
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package fr.ill.ics.client.view.menu;
import fr.ill.ics.client.view.MainWindowPeer;
/**
* Action associated with "Logs" menu item
*
* @author ortiz
*/
public class ShowHideSelectionTreeAction implements IMenuAction {
public void execute(boolean checked, int x, int y) {
if (checked) {
MainWindowPeer.getInstance().showSelectionArea();
} else {
MainWindowPeer.getInstance().hideSelectionArea();
}
}
}
\ No newline at end of file
......@@ -95,6 +95,7 @@ public class SWTMainWindowPeer extends MainWindowPeer {
//private SWTWaitingDialog waitingDialog;
private Composite parentPluginAreaComposite;
private Sash sash;
private FormData sashData;
private SWTConfigurationErrorsWindow configurationErrorsWindow;
// Singleton pattern: keep the constructor private
......@@ -293,6 +294,9 @@ public class SWTMainWindowPeer extends MainWindowPeer {
menuBuilder.init();
shell.setMenuBar(((SWTMenuBuilder)menuBuilder).getMenuBar());
// if "view selection tree" menu item is available
// MainWindowPeer.getInstance().setMenuItemChecked("menu.view.selectionTree", true);
this.pluginArea = SWTWidgetFactory.getInstance().createComposite(parentPluginAreaComposite, SWT.NONE);
this.pluginArea.setLayoutData(SWTWidgetFactory.getInstance().getGridData());
this.pluginArea.setLayout(SWTWidgetFactory.getInstance().getStackLayout());
......@@ -304,7 +308,7 @@ public class SWTMainWindowPeer extends MainWindowPeer {
selectionAreaData.bottom = new FormAttachment(100, 0);
selectionArea.setLayoutData(selectionAreaData);
final FormData sashData = new FormData();
sashData = new FormData();
sashData.left = new FormAttachment(selectionAreaWeight, 0);
sashData.top = new FormAttachment(0, 0); // Attach to top
sashData.bottom = new FormAttachment(100, 0); // Attach to bottom
......@@ -683,7 +687,19 @@ public class SWTMainWindowPeer extends MainWindowPeer {
}
}
@Override
public void hideSelectionArea() {
sashData.left = new FormAttachment(0, 0);
shell.layout(true, true);
}
@Override
public void showSelectionArea() {
sashData.left = new FormAttachment(selectionAreaWeight, 0);
shell.layout(true, true);
}
/*
public void openWaitingProgressionDialog() {
// Create a waiting dialog
......
......@@ -44,11 +44,6 @@ public final class Constants {
public final static int SELECTION_PLUGIN_TOOL_BAR_HEIGHT = 51;
public final static int BALLOON_CONTENT_TOP_MARGIN = 55;
public final static int BALLOON_CONTENT_BOTTOM_MARGIN = 8;
public final static int BALLOON_CONTENT_LEFT_MARGIN = 16;
public static int getScaledConstant(String constantName) {
String value = Nomad.getVariableValue(Constants.class.getName(), constantName);
if (value != null) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment