|
55 | 55 | import com.junichi11.netbeans.modules.github.issues.ui.AttributesListCellRenderer; |
56 | 56 | import com.junichi11.netbeans.modules.github.issues.utils.UiUtils; |
57 | 57 | import java.awt.Color; |
| 58 | +import java.awt.Dimension; |
58 | 59 | import java.awt.Font; |
59 | 60 | import java.beans.PropertyChangeListener; |
60 | 61 | import java.text.DateFormat; |
@@ -202,6 +203,9 @@ public void update() { |
202 | 203 |
|
203 | 204 | // title |
204 | 205 | titleTextField.setText(issue.getTitle()); |
| 206 | + Dimension dim = titleTextField.getPreferredSize(); |
| 207 | + titleTextField.setMinimumSize(new Dimension(0, dim.height)); |
| 208 | + titleTextField.setPreferredSize(new Dimension(0, dim.height)); |
205 | 209 |
|
206 | 210 | // description |
207 | 211 | descriptionTabbedPanel.setText(issue.getBody()); |
@@ -360,7 +364,12 @@ private void setHeader() { |
360 | 364 | headerStatusLabel.setText(""); |
361 | 365 |
|
362 | 366 | } else { |
363 | | - headerNameLabel.setText(String.format("%s #%s", gitHubIssue.getSummary(), gitHubIssue.getID())); // NOI18N |
| 367 | + String summary = gitHubIssue.getSummary(); |
| 368 | + headerNameLabel.setText(String.format("%s #%s", summary, gitHubIssue.getID())); // NOI18N |
| 369 | + Dimension dim = headerNameLabel.getPreferredSize(); |
| 370 | + headerNameLabel.setMinimumSize(new Dimension(0, dim.height)); |
| 371 | + headerNameLabel.setPreferredSize(new Dimension(0, dim.height)); |
| 372 | + |
364 | 373 | headerSubmitButton.setText(Bundle.GitHubIssuePanel_label_header_submit_button()); |
365 | 374 | headerSubmitButton.setVisible(gitHubIssue.isEditableUser()); |
366 | 375 | Issue issue = gitHubIssue.getIssue(); |
@@ -653,8 +662,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { |
653 | 662 | .addComponent(headerCreatedByUserLabel) |
654 | 663 | .addGap(0, 0, Short.MAX_VALUE)) |
655 | 664 | .addGroup(headerPanelLayout.createSequentialGroup() |
656 | | - .addComponent(headerNameLabel) |
657 | | - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
| 665 | + .addComponent(headerNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
| 666 | + .addGap(18, 18, 18) |
658 | 667 | .addComponent(refreshLinkButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) |
659 | 668 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
660 | 669 | .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 6, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
0 commit comments