Viewing Issue Advanced Details

ID 0003740 Category [DMDirc] *Unsorted Severity minor
Reproducibility always Date Submitted 2010-02-06 14:50 Last Update 2010-03-06 21:32
Reporter Greboid Assigned To Greboid View Status public
Priority normal Status closed Resolution fixed
Platform Fixed in Version Target Version 0.6.3
Product Version Product Build
Summary 0003740: AED trigger combobox is shorter than the dropdown if only small triggers exist
Description
AED trigger combobox is shorter than the dropdown if only small triggers exist
Needs unit test no
Upstream Bug URL

Relationships

Notes

A patchset (1) related to this change has been added to gerrit by Gregory Holmes

The popup for the AED triggers should be at least as wide as the combobox and
wider if required.

Fixes issue 3740

Change-Id: Ia3f18e1bcc424417317d97fafc262749d5bf25a9
authorGregory Holmes <greg@dmdirc.com>2010-02-06 14:50:24 (GMT)
committer Shane Mc Cormack <shane@dmdirc.com>2010-02-06 19:45:12 (GMT)
commit1954d41816b236aacbb177a62954a16c6bd0e725 (patch) (side-by-side diff)
The popup for the AED triggers should be at least as wide as the combobox and wider if required.
Fixes issue 3740 Change-Id: Ia3f18e1bcc424417317d97fafc262749d5bf25a9 Reviewed-on: http://gerrit.dmdirc.com/855 Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com> Reviewed-by: Shane Mc Cormack <shane@dmdirc.com>
-rw-r--r--src/com/dmdirc/addons/ui_swing/dialogs/actioneditor/ActionTriggersPanel.java11
1 files changed, 6 insertions, 5 deletions
Click to Expand/Collapse
diff src/com/dmdirc/addons/ui_swing/dialogs/actioneditor/ActionTriggersPanel.java
@@ -101,12 +101,13 @@ public class ActionTriggersPanel extends JPanel implements ActionListener,
getComponent(0);
Dimension size = scrollPane.getPreferredSize();
if (scrollPane instanceof JScrollPane) {
- size.width = ((ActionTypeModel) trigger.getModel()).
- getMaxWidth() + (int) ((JScrollPane) scrollPane).
- getVerticalScrollBar().getPreferredSize().getWidth();
+ size.width = Math.max(size.width, ((ActionTypeModel)
+ trigger.getModel()).getMaxWidth() + (int)
+ ((JScrollPane) scrollPane).getVerticalScrollBar().
+ getPreferredSize().getWidth());
} else {
- size.width = ((ActionTypeModel) trigger.getModel()).
- getMaxWidth();
+ size.width = Math.max(size.width, ((ActionTypeModel)
+ trigger.getModel()). getMaxWidth());
}
scrollPane.setPreferredSize(size);
scrollPane.setMaximumSize(size);

Issue History

Date Modified Username Field Change
2010-02-06 14:50 Greboid New Issue
2010-02-06 14:51 Version Control Checkin
2010-02-06 14:51 Version Control Note Added: 0009758
2010-02-06 14:51 Version Control Status new => fix pending
2010-02-06 19:46 Greboid Checkin
2010-02-06 19:46 Greboid Note Added: 0009759
2010-02-06 19:46 Greboid Status fix pending => resolved
2010-02-06 19:46 Greboid Resolution open => fixed
2010-02-07 20:02 Greboid Needs unit test => no
2010-02-07 20:02 Greboid Assigned To => Greboid
2010-03-06 21:32 Greboid Status resolved => closed