mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-05 11:53:53 +00:00
bug3529 Improved appearance of "make default"-button
This commit is contained in:
1 parent
91ad43bea8
commit
23fb9fb8f2
6 files changed
+32
-11
No files matched your search
+1
@@ -244,6 +244,7 @@ public class RaceBoardPanel extends AbstractRootPerspectiveComposite<RaceBoardPe
|
||||
raceMap.getLeftHeaderPanel().add(raceInformationHeader);
|
||||
raceMap.getRightHeaderPanel().add(regattaAndRaceTimeInformationHeader);
|
||||
raceMap.getRightHeaderPanel().add(userManagementMenuView);
|
||||
addChildComponent(raceMap);
|
||||
|
||||
// Determine if the screen is large enough to initially display the leaderboard panel on the left side of the
|
||||
// map based on the initial screen width. Afterwards, the leaderboard panel visibility can be toggled as usual.
|
||||
|
||||
@@ -23,4 +23,7 @@ public interface StringMessages extends Messages {
|
||||
String settings();
|
||||
String settingsForComponent(String localizedShortName);
|
||||
String pleaseSelect();
|
||||
//TODO add to properties files
|
||||
@DefaultMessage("Make default")
|
||||
String makeDefault();
|
||||
}
|
||||
+2
-1
@@ -24,4 +24,5 @@ error=Fehler
|
||||
configuration=Konfiguration
|
||||
settings=Einstellungen
|
||||
settingsForComponent=Einstellungen für {0}
|
||||
pleaseSelect=Bitte auswählen
|
||||
pleaseSelect=Bitte auswählen
|
||||
makeDefault=Als Standard verwenden
|
||||
@@ -22,6 +22,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.Button;
|
||||
import com.google.gwt.user.client.ui.CheckBox;
|
||||
import com.google.gwt.user.client.ui.DialogBox;
|
||||
import com.google.gwt.user.client.ui.DockPanel;
|
||||
import com.google.gwt.user.client.ui.DoubleBox;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.FocusWidget;
|
||||
@@ -63,7 +64,9 @@ public abstract class DataEntryDialog<T> {
|
||||
private final Button cancelButton;
|
||||
private final Label statusLabel;
|
||||
private final FlowPanel panelForAdditionalWidget;
|
||||
private final FlowPanel buttonPanel;
|
||||
private final DockPanel buttonPanel;
|
||||
private final FlowPanel rightButtonPanel;
|
||||
private final FlowPanel leftButtonPanel;
|
||||
|
||||
public static interface Validator<T> {
|
||||
/**
|
||||
@@ -126,14 +129,20 @@ public abstract class DataEntryDialog<T> {
|
||||
panelForAdditionalWidget = new FlowPanel();
|
||||
panelForAdditionalWidget.setWidth("100%");
|
||||
dialogFPanel.add(panelForAdditionalWidget);
|
||||
buttonPanel = new FlowPanel();
|
||||
buttonPanel = new DockPanel();
|
||||
buttonPanel.setWidth("100%");
|
||||
dialogFPanel.add(buttonPanel);
|
||||
buttonPanel.setStyleName("additionalWidgets");
|
||||
buttonPanel.add(okButton);
|
||||
rightButtonPanel = new FlowPanel();
|
||||
leftButtonPanel = new FlowPanel();
|
||||
leftButtonPanel.setStyleName("additionalWidgetsLeft");
|
||||
rightButtonPanel.setStyleName("additionalWidgetsRight");
|
||||
rightButtonPanel.add(okButton);
|
||||
buttonPanel.add(rightButtonPanel, DockPanel.EAST);
|
||||
buttonPanel.add(leftButtonPanel, DockPanel.WEST);
|
||||
cancelButton = new Button(cancelButtonName);
|
||||
cancelButton.getElement().getStyle().setMargin(3, Unit.PX);
|
||||
cancelButton.ensureDebugId("CancelButton");
|
||||
buttonPanel.add(cancelButton);
|
||||
rightButtonPanel.add(cancelButton);
|
||||
cancelButton.addClickHandler(new ClickHandler() {
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
@@ -591,7 +600,11 @@ public abstract class DataEntryDialog<T> {
|
||||
dateEntryDialog.addAutoHidePartner(element);
|
||||
}
|
||||
|
||||
protected FlowPanel getButtonPannel() {
|
||||
return buttonPanel;
|
||||
protected FlowPanel getLeftButtonPannel() {
|
||||
return leftButtonPanel;
|
||||
}
|
||||
|
||||
protected FlowPanel getRightButtonPannel() {
|
||||
return rightButtonPanel;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -73,10 +73,10 @@ public class SettingsDialog<SettingsType extends Settings> extends DataEntryDial
|
||||
});
|
||||
this.settingsDialogComponent = dialogComponent;
|
||||
|
||||
Button makeDefaultButton = new Button("");
|
||||
Button makeDefaultButton = new Button(stringMessages.makeDefault());
|
||||
makeDefaultButton.getElement().getStyle().setMargin(3, Unit.PX);
|
||||
makeDefaultButton.ensureDebugId("MakeDefaultButton");
|
||||
getButtonPannel().add(makeDefaultButton);
|
||||
getLeftButtonPannel().add(makeDefaultButton);
|
||||
makeDefaultButton.addClickHandler(new ClickHandler() {
|
||||
public void onClick(ClickEvent event) {
|
||||
//TODO send notification
|
||||
|
||||
@@ -811,10 +811,13 @@ body ::-webkit-scrollbar-track {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.gwt-DialogBox .additionalWidgets {
|
||||
.gwt-DialogBox .additionalWidgetsRight {
|
||||
padding: 5px 0 0 0;
|
||||
text-align: right;
|
||||
}
|
||||
.gwt-DialogBox .additionalWidgetsLeft {
|
||||
padding: 5px 0 0 0;
|
||||
}
|
||||
|
||||
.gwt-DialogBox .gwt-Label {
|
||||
line-height: 1.4;
|
||||
|
||||
Reference in new issue
Block a user