Skip to content

Commit ed96b0f

Browse files
committed
Fixes. Added close button to the dialog. Disabled line wrapping.
1 parent b8ada3b commit ed96b0f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/ui/console/log/LogPanel.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.intellij.icons.AllIcons;
77
import com.intellij.openapi.Disposable;
88
import com.intellij.openapi.project.Project;
9+
import com.intellij.openapi.ui.popup.IconButton;
910
import com.intellij.openapi.ui.popup.JBPopupFactory;
1011
import com.intellij.openapi.util.Disposer;
1112
import com.intellij.ui.components.JBScrollPane;
@@ -179,7 +180,7 @@ private void showPopup(String title, String details) {
179180
popupPanel.setBorder(JBUI.Borders.empty(THICKNESS));
180181

181182
JTextArea exceptionDetails = new JTextArea();
182-
exceptionDetails.setLineWrap(true);
183+
exceptionDetails.setLineWrap(false);
183184
exceptionDetails.append(details);
184185
JLabel jLabel = new JLabel(truncateString(details, SHORT_STRING_LENGTH), AllIcons.Process.State.RedExcl, JLabel.LEFT);
185186

@@ -193,6 +194,7 @@ private void showPopup(String title, String details) {
193194
popupPanel,
194195
log.getComponent())
195196
.setTitle(title)
197+
.setCancelButton(new IconButton("Close", AllIcons.Actions.Close, AllIcons.Actions.CloseHovered))
196198
.createPopup()
197199
.showInFocusCenter();
198200
}

ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/ui/datasource/interactions/DataSourceDialog.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.intellij.openapi.project.Project;
77
import com.intellij.openapi.ui.DialogWrapper;
88
import com.intellij.openapi.ui.ValidationInfo;
9+
import com.intellij.openapi.ui.popup.IconButton;
910
import com.intellij.openapi.ui.popup.JBPopupFactory;
1011
import com.intellij.openapi.util.Disposer;
1112
import com.intellij.ui.components.JBScrollPane;
@@ -66,6 +67,7 @@ private void createPopup(JPanel popupPanel, JComponent contentPanel) {
6667
JBPopupFactory.getInstance()
6768
.createComponentPopupBuilder(popupPanel, getPreferredFocusedComponent())
6869
.setTitle("Test connection")
70+
.setCancelButton(new IconButton("Close", AllIcons.Actions.Close, AllIcons.Actions.CloseHovered))
6971
.createPopup()
7072
.showInCenterOf(contentPanel);
7173
}
@@ -118,7 +120,7 @@ private void connectionFailed(
118120
JLabel connectionFailed = new JLabel("Connection failed: " + truncateString(exception.getMessage(), SHORT_STRING_LENGTH), AllIcons.Process.State.RedExcl, JLabel.LEFT);
119121

120122
JTextArea exceptionCauses = new JTextArea();
121-
exceptionCauses.setLineWrap(true);
123+
exceptionCauses.setLineWrap(false);
122124
exceptionCauses.append(getCause(exception));
123125

124126
JBScrollPane scrollPane = new JBScrollPane(exceptionCauses);

0 commit comments

Comments
 (0)