[Scribus] Metacity bug

Andreas Vox vox
Sat Oct 22 23:23:00 CEST 2005


> On Saturday 22 October 2005 21:54, Frank Cox wrote:
> > I brought this up before and was told that it is a bug in Metacity.
> >
> > When selecting a text colour or a font from what should be a 
> drop-down list
> > on Fedora Core 4, it comes up instead as a full-screen multi-column 
> list .
> > This in itself is not a problem, except that when the number of 
> colours or
> > number of fonts exceeds the available space on the screen, the rest
> > disappears off to the right of the screen and can not be accessed.
> >
> > However, the usual drop-down list appears when selecting a line or 
> fill
> > colour through the Show Properties/Colours menu.
> >
> > Metacity as distributed for Fedora Core 4 has been updated a couple 
> of
> > times since I initially reported this, but the bug is still there.
> >
> > What are the chances of changing the way that the font name and text
> > colours present the available choices to match the way that the Show
> > Properties/Colours menu displays those choices?
>
> They both use QComboBoxes, although the parent widget types are 
> different, one
> being a menu and one not. This must cause the issue. FWIW, the menu is 
> going
> to disappear in 1.3.x sometime.

QComboBoxes either use a QList or a QPopupMenu to display the choices. 
QList is scrollable, QPopupMenu supplies the screen filling panorama 
view on some platforms.

When I experimented with QComboBoxes I found out that the choice is 
controlled by
a) the QStyle used,
b) the "editable" property of the QComboBox (fonts and colors have 
editable=true)
The only reliable way to make Qt stick to QLists was to provide a 
QStyle which requested that behaviour (see sccomobox.h/cpp). 
Unfortunately this has to be done for every possibly QStyle,
and what's more, some of those QStyles are provided by plugins 
(probably also the one Metacity uses).

I don't expect we're going to have a straightforward solution for this. 
My approach in sccombobox is really a hack. Situation might improve 
when we switch to Qt4, but maybe not.

In fact this is a Qt issue rsp. an issue of the QStyle developers. If 
you really want to have this changed, find out what QStyle is used on 
your platform and talk to its developers (QStyle::SH_ComboBox_Popup 
should be false).

There also have been thoughts about developing a specialized 
fontselector widget which would preview the fonts and allowed 
expandable submenues for font families. This wou?d remedy the situation 
for fonts. For colors I recommend deleting unused colors so the menu 
gets smaller.

/Andreas




More information about the scribus mailing list