[Mono-bugs] [Bug 361020] New: FontDialog: returns different Font style/ size than displayed etc

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Feb 12 04:53:23 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=361020


           Summary: FontDialog: returns different Font style/size than
                    displayed etc
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: andyhume32 at yahoo.co.uk
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=194398)
 --> (https://bugzilla.novell.com/attachment.cgi?id=194398)
Repro code

Repro attached, it displays the font dialog six times and is hows various
inconsistencies between the font expected to be displayed, and also
inconsistencies between the font that was display in the dialog and the font
returned by the dialog.  For the first three cases, the size and style
attributes of the font are ignored when displaying the dialog (want size 12 see
8; styles ignored).  In the latter three cases the size and style listboxes are
initialised but the strikeout/underline checkboxes are not.

In most cases the font returned by the dialog is different from the font that
was displayed in the dialog.


This actually has two root causes:
1) FontDialog ignores (aspects of) the font passed in
2) FontDialog returns different Font style/size than displayed

For 2).  The font object that the dialog will return is only updated when a UI
event occurs, this means any bug with setting the control states will cause an
inconsistency.  I'd like the dialog simply to read the controls on the user
hitting <OK> or <Apply>, and thus it will always return a font that matches
what the user saw.  Or we should do validation in form_Closing and
OnApplyButton, and display a message saying "Internal error: inconsistent
values, please use Cancel to close the dialog"(!!).

For 1).  The inconsistency in displaying the dialog is caused by a bug in how
the controls are initialised from the font the called passed in (to set_Font). 
Again the setting is all done through UI events.  Two bugs exists for it.

The size and style controls _only_ get updated when the font 'name'/family
listbox selected-item changes.  As the first three repro cases show, this only
occurs when the font family is _not_ GenericSansSerif.

The second is that the Strikeout and Underline checkboxes are never
initialised.  They should be initialised at the same time as the
Regular/Bold/Italic listbox.  This is shown by the latter three cases.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list