Skip to content

Commit 9162a80

Browse files
committed
Fixes. Added close button to the dialog. Disabled line wrapping.
1 parent 1622691 commit 9162a80

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-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;
@@ -182,7 +183,7 @@ private void showPopup(String title, String details) {
182183
popupPanel.setBorder(JBUI.Borders.empty(THICKNESS));
183184

184185
JTextArea exceptionDetails = new JTextArea();
185-
exceptionDetails.setLineWrap(true);
186+
exceptionDetails.setLineWrap(false);
186187
exceptionDetails.append(details);
187188
JLabel jLabel = new JLabel(truncateString(details, SHORT_STRING_LENGTH), AllIcons.Process.State.RedExcl, JLabel.LEFT);
188189

@@ -196,6 +197,7 @@ private void showPopup(String title, String details) {
196197
popupPanel,
197198
log.getComponent())
198199
.setTitle(title)
200+
.setCancelButton(new IconButton("Close", AllIcons.Actions.Close, AllIcons.Actions.CloseHovered))
199201
.createPopup()
200202
.showInFocusCenter();
201203
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ private void createPopup(JPanel popupPanel, JComponent contentPanel) {
6868
.createComponentPopupBuilder(popupPanel, getPreferredFocusedComponent())
6969
.setCancelButton(new IconButton("Close", AllIcons.Actions.Close))
7070
.setTitle("Test connection")
71+
.setCancelButton(new IconButton("Close", AllIcons.Actions.Close, AllIcons.Actions.CloseHovered))
7172
.createPopup()
7273
.showInCenterOf(contentPanel);
7374
}
@@ -120,7 +121,7 @@ private void connectionFailed(
120121
JLabel connectionFailed = new JLabel("Connection failed: " + truncateString(exception.getMessage(), SHORT_STRING_LENGTH), AllIcons.Process.State.RedExcl, JLabel.LEFT);
121122

122123
JTextArea exceptionCauses = new JTextArea();
123-
exceptionCauses.setLineWrap(true);
124+
exceptionCauses.setLineWrap(false);
124125
exceptionCauses.append(getCause(exception));
125126

126127
JBScrollPane scrollPane = new JBScrollPane(exceptionCauses);

0 commit comments

Comments
 (0)