set size hint of list items to 32 pixel height in the devices list, too. looks

better

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1071252
This commit is contained in:
Volker Lanz 2010-01-07 19:24:13 +00:00
parent 71ed639866
commit 0487aa276c
2 changed files with 17 additions and 9 deletions

View File

@ -51,8 +51,9 @@ void ListDevices::updateDevices()
{
const QString shortText = d->deviceNode() + " (" + Capacity(*d).toString() + ')';
const QString longText = d->deviceNode() + " (" + Capacity(*d).toString() + ", " + d->name() + ')';
QListWidgetItem* item = new QListWidgetItem(SmallIcon("drive-harddisk"), shortText);
QListWidgetItem* item = new QListWidgetItem(DesktopIcon("drive-harddisk"), shortText);
item->setToolTip(longText);
item->setSizeHint(QSize(0, 32));
listDevices().addItem(item);
}

View File

@ -1,7 +1,8 @@
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ListDevicesBase</class>
<widget class="QWidget" name="ListDevicesBase" >
<property name="geometry" >
<widget class="QWidget" name="ListDevicesBase">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@ -9,18 +10,24 @@
<height>396</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout" >
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QListWidget" name="m_ListDevices" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
<widget class="QListWidget" name="m_ListDevices">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy" >
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
</widget>
</item>
</layout>