This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 164247 - 6.7 Beta: Font Chooser too small
Summary: 6.7 Beta: Font Chooser too small
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Options (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: NETFIX
Depends on:
Blocks: 169003
  Show dependency tree
 
Reported: 2009-04-30 20:58 UTC by fommil
Modified: 2009-07-23 09:10 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Fonts & Colors -> ... (Font Chooser) (31.44 KB, image/png)
2009-04-30 21:00 UTC, fommil
Details
patch against main-golden, see comments (3.47 KB, patch)
2009-05-02 12:27 UTC, fommil
Details | Diff
Screenshot of Font Chooser after application of patch (34.35 KB, image/png)
2009-05-02 12:27 UTC, fommil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fommil 2009-04-30 20:58:34 UTC
See screenshot, the Font Chooser is too small when first opened.
Comment 1 fommil 2009-04-30 21:00:29 UTC
Created attachment 81351 [details]
Fonts & Colors -> ... (Font Chooser)
Comment 2 fommil 2009-04-30 21:01:35 UTC
Note: when resized, the "Preview" section doesn't need to grow. The lists are the important parts that need more room.
Comment 3 fommil 2009-04-30 22:33:19 UTC
I've discovered that the relevant classes for this are:-

org.netbeans.beaninfo.editors.FontEditor.FontPanel (in o.n.core)
org.netbeans.modules.options.colors.SyntaxColoringPanel.actionPerformed (in options.editor)

But the source code for FontPanel doesn't use the Form editor so I'm finding it a little difficult to find the relevant piece to edit.
Comment 4 fommil 2009-04-30 22:33:59 UTC
I'd like to NetFIX [1] this bug. Is it possible? [1] http://wiki.netbeans.org/NetFIX
Comment 5 fommil 2009-04-30 23:09:49 UTC
I've been able to fix the problem by requiring the following in FontPanel

        @Override
        public Dimension getPreferredSize () {
            return new Dimension (400, 300);
        }

but I'd still like to impose a maximum height on the "Preview" and this is trickier than I thought.
Comment 6 fommil 2009-05-02 12:26:37 UTC
(Sorry, for some reason bugzilla insists on adding Macintosh to all my bug reports as default)

I'm about to upload a patch to fix this for main-golden. The patch addresses the original bug, but also makes some minor improvements in ergonomics:-

- demo text now uses the industry standard Pangram http://en.wikipedia.org/wiki/The_quick_brown_fox_jumps_over_the_lazy_dog
   translators are advised to consult http://en.wikipedia.org/wiki/List_of_pangrams

- font lists are often very long, so the scrollpane now centres on the currently selected font (styles and sizes) when constructed

See (soon to be attached) screenshot to see the default window after applying patch.
Comment 7 fommil 2009-05-02 12:27:23 UTC
Created attachment 81402 [details]
patch against main-golden, see comments
Comment 8 fommil 2009-05-02 12:27:54 UTC
Created attachment 81403 [details]
Screenshot of Font Chooser after application of patch
Comment 9 fommil 2009-05-02 12:29:39 UTC
also, patch removes emphasis on re-scaling the y dimension of the Preview box. It shouldn't scale, priority should be given to the JLists.
Comment 10 Vitezslav Stejskal 2009-05-05 21:19:26 UTC
Patch applied, http://hg.netbeans.org/jet-main/rev/b35e22b8d0e8. Thanks!
Comment 11 Quality Engineering 2009-05-07 07:48:21 UTC
Integrated into 'main-golden', will be available in build *200905070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b35e22b8d0e8
User: Vita Stejskal <vstejskal@netbeans.org>
Log: #164247: 6.7 Beta: Font Chooser too small (applying fommil's patch, thanks)