Console vs TS usability #1757

This commit is contained in:
rusefi 2020-09-19 16:14:00 -04:00
parent a2ec524c29
commit eba4340f16
2 changed files with 7 additions and 2 deletions

View File

@ -88,7 +88,7 @@ public class GaugesPanel {
prepareMessagesPanel();
lowerRpmPanel.add(new RpmLabel(uiContext,15).getContent());
lowerRpmPanel.add(new RpmLabel(uiContext,15, false).getContent());
int rows = config.getIntProperty(GAUGES_ROWS, DEFAULT_ROWS);
int columns = config.getIntProperty(GAUGES_COLUMNS, DEFAULT_COLUMNS);

View File

@ -26,12 +26,17 @@ public class RpmLabel {
}
public RpmLabel(UIContext uiContext, int size) {
this(uiContext, size, true);
}
public RpmLabel(UIContext uiContext, int size, boolean withCaption) {
String initialLabel = uiContext.getLinkManager().isLogViewer() ? "LOG" : NO_CONNECTION;
rpmValue.setText(initialLabel);
rpmValue.setForeground(Color.red);
content.setBorder(BorderFactory.createLineBorder(Color.white));
content.add(rpmCaption);
if (withCaption)
content.add(rpmCaption);
content.add(rpmValue, "grow, wrap");
RpmModel.getInstance().addListener(new RpmModel.RpmListener() {