Viewing Issue Advanced Details

ID 0003138 Category [DMDirc] User Interface Severity minor
Reproducibility always Date Submitted 2009-11-20 23:41 Last Update 2010-03-06 21:33
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 0003138: Add native font option to textpane + prefs
Description
Add native font option to textpane + prefs
Needs unit test no
Upstream Bug URL

Relationships

Notes

authorGregory Holmes <greg@dmdirc.com>2009-11-21 20:45:38 (GMT)
committer Chris Smith <chris@dmdirc.com>2009-11-21 20:48:32 (GMT)
commit2585f33604e01efb5bd850d27bc4e3aafaa7884e (patch) (side-by-side diff)
Change-Id: I826aeaf91953295b073d54742a5db99b32517c52 Reviewed-on: http://gerrit.dmdirc.com/76 Reviewed-by: Chris Smith <chris@dmdirc.com> Tested-by: Chris Smith <chris@dmdirc.com>
-rw-r--r--src/com/dmdirc/addons/ui_swing/SwingController.java2
-rw-r--r--src/com/dmdirc/addons/ui_swing/components/FontPicker.java1
-rw-r--r--src/com/dmdirc/ui/core/util/Utils.java3
3 files changed, 5 insertions, 1 deletions
Click to Expand/Collapse
diff src/com/dmdirc/addons/ui_swing/SwingController.java
@@ -634,7 +634,7 @@ public final class SwingController extends Plugin implements UIController {
defaults.setOption("ui", "textPaneFontName",
- UIManager.getFont("TextPane.font").getFamily());
+ "SystemNativeFont");
defaults.setOption("ui", "textPaneFontSize",
UIManager.getFont("TextPane.font").getSize());
}
Click to Expand/Collapse
diff src/com/dmdirc/addons/ui_swing/components/FontPicker.java
@@ -48,6 +48,7 @@ public class FontPicker extends JComboBox {
final String[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().
getAvailableFontFamilyNames();
final int size = getFont().getSize();
+ ((DefaultComboBoxModel) getModel()).addElement("SystemNativeFont");
for (String font : fonts) {
((DefaultComboBoxModel) getModel()).addElement(new Font(font,
Font.PLAIN, size));
Click to Expand/Collapse
diff src/com/dmdirc/ui/core/util/Utils.java
@@ -82,6 +82,9 @@ public class Utils {
} else {
fontName = defaultFont.getName();
}
+ if ("SystemNativeFont".equals(fontName)) {
+ fontName = defaultFont.getName();
+ }
if (config.hasOptionString("ui", "textPaneFontSize")) {
lineHeight = config.getOptionInt("ui", "textPaneFontSize");
} else {

Issue History

Date Modified Username Field Change
2009-11-20 23:41 Greboid New Issue
2009-11-20 23:41 Greboid Status new => assigned
2009-11-20 23:41 Greboid Assigned To => Greboid
2009-11-21 20:49 Greboid Checkin
2009-11-21 20:49 Greboid Note Added: 0008070
2009-11-21 20:49 Greboid Status assigned => resolved
2009-11-21 20:49 Greboid Resolution open => fixed
2009-11-21 22:49 MD87 Category *Unsorted => User Interface
2010-03-06 21:33 Greboid Status resolved => closed