[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#536667: Settings window in media player example is too wide



Package: qt4-demos
Version: 4.5.2-1
Severity: minor

The Qt4 demos include a media player under the "Demonstrations"
category. If I launch this demo and open the settings dialog, it's much
wider than it should be. Probably about twice as wide as my screen.

I'm guessing that this is because the Audio device drop-down contains
not just the name of the audio device, but also its description. This
appears to be the relevant part of the example source code:

     // Insert audio devices:
     QList<Phonon::AudioOutputDevice> devices =
Phonon::BackendCapabilities::availableAudioOutputDevices();
     for (int i=0; i<devices.size(); i++){
         QString itemText = devices[i].name();
         if (!devices[i].description().isEmpty()) {
             itemText += QString::fromLatin1("
(%1)").arg(devices[i].description());
         }
         ui->deviceCombo->addItem(itemText);
         if (devices[i] == m_AudioOutput.outputDevice())
             ui->deviceCombo->setCurrentIndex(i);
     }

In my case, the drop-down contains the following texts:

"SBLive! Value (rev.8) Standard PCM Playback (<html>This will try the
following devices and use the first that works: <ol><li>ALSA:
x-phonon:CARD=0,DEV=0</li><li>ALSA: plughw: CARD=0,DEV=0</li><li>OSS:
/dev/dsp</li><li>OSS: /dev/audio</li></ol></html>)

"PulseAudio (xine audio output plugin using pulseaudio sound server)"

"Jack Audio Connection Kid (<html><p>JACK is a low-latency audio server.
It can connect a number of different applications to an audio device, as
well as allowing them to share audio between themselves.</p><p>JACK was
designed from the ground up for professional audio work, and its design
focuses on two key areas: synchronous execution of all clients, and low
latency operation.</p></html>)"

"Esound (ESD) (xine audio output plugin using esound)"

I don't know if this is a problem with the demo, or if some of the audio
devices are abusing the description field. The KDE 4 Multimedia - System
Settings dialog only lists the name (e.g. "Jack Audio Connection Kit")
and uses the description for a tooltip, and I like that.

Sincerely,

Torbjörn Andersson




Reply to: