Viewing Issue Advanced Details

ID 0003584 Category [DMDirc] *Unsorted Severity minor
Reproducibility always Date Submitted 2010-01-23 20:41 Last Update 2010-03-06 21:32
Reporter MD87 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 0003584: Textpane border is incorrect under gnome
Description Textpane border is incorrect under gnome
Needs unit test no
Upstream Bug URL

Relationships

Notes

(0009761)
Version Control (developer)
2010-02-06 21:51

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

Fixes issue 3584: Textpane border is incorrect under gnome

I'm not 100% happy about doing this, its the wrong border, but its definately a
huge improvement

Change-Id: Ibd05a4952b21f7c08e975340bfcda1f1d6127da2
(0009762)
Version Control (developer)
2010-02-06 23:05

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

Fixes issue 3584: Textpane border is incorrect under gnome

I'm not 100% happy about doing this, its the wrong border, but its definately a
huge improvement

Change-Id: Ibd05a4952b21f7c08e975340bfcda1f1d6127da2
authorGregory Holmes <greg@dmdirc.com>2010-02-06 21:50:30 (GMT)
committer Shane Mc Cormack <shane@dmdirc.com>2010-02-06 23:24:04 (GMT)
commit5e0672480b7e3a32ec09366766199323648ef2d7 (patch) (side-by-side diff)
Fixes issue 3584: Textpane border is incorrect under gnome
I'm not 100% happy about doing this, its the wrong border, but its definately a huge improvement Change-Id: Ibd05a4952b21f7c08e975340bfcda1f1d6127da2 Reviewed-on: http://gerrit.dmdirc.com/856 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/textpane/TextPaneUI.java33
1 files changed, 7 insertions, 26 deletions
Click to Expand/Collapse
diff src/com/dmdirc/addons/ui_swing/textpane/TextPaneUI.java
@@ -22,8 +22,6 @@
package com.dmdirc.addons.ui_swing.textpane;
-import java.awt.Graphics2D;
-
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.UIManager;
@@ -38,33 +36,16 @@ public class TextPaneUI extends ComponentUI {
/** {@inheritDoc} */
@Override
public void installUI(final JComponent c) {
- Border border = UIManager.getBorder("TextField.border");
+ Border border;
+ if (UIManager.getLookAndFeel().getClass().getName().equals(
+ "com.sun.java.swing.plaf.gtk.GTKLookAndFeel")) {
+ border = UIManager.getBorder("TitledBorder.border");
+ } else {
+ border = UIManager.getBorder("TextField.border");
+ }
if (border == null) {
border = BorderFactory.createEtchedBorder();
}
c.setBorder(border);
}
-
- /** {@inheritDoc} */
- /*@Override
- public void paint(final Graphics g, final JComponent c) {
- if (c.isOpaque()) {
- g.setColor(c.getBackground());
- g.fillRect(0, 0, c.getWidth(), c.getHeight());
- }
- paint(g, c);
- }*/
-
- /** {@inheritDoc} */
- /*@Override
- public void update(final Graphics g, final JComponent c) {
- if (c.isOpaque()) {
- g.setColor(c.getBackground());
- g.fillRect(0, 0, c.getWidth(), c.getHeight());
- }
- paint(g, c);
- }*/
-
- protected void paintTextPane(final Graphics2D g, final TextPane c) {
- }
} \ No newline at end of file

Issue History

Date Modified Username Field Change
2010-01-23 20:41 MD87 New Issue
2010-01-23 20:41 MD87 Status new => assigned
2010-01-23 20:41 MD87 Assigned To => Greboid
2010-01-23 21:49 Greboid Needs unit test => no
2010-01-23 21:49 Greboid Target Version 0.6.3 => 0.7
2010-02-06 21:50 Greboid Target Version 0.7 => 0.6.3
2010-02-06 21:51 Version Control Checkin
2010-02-06 21:51 Version Control Note Added: 0009761
2010-02-06 21:51 Version Control Status assigned => fix pending
2010-02-06 23:05 Version Control Checkin
2010-02-06 23:05 Version Control Note Added: 0009762
2010-02-06 23:25 Greboid Checkin
2010-02-06 23:25 Greboid Note Added: 0009763
2010-02-06 23:25 Greboid Status fix pending => resolved
2010-02-06 23:25 Greboid Resolution open => fixed
2010-03-06 21:32 Greboid Status resolved => closed