Commit 318eb0bd authored by Christian Kandeler's avatar Christian Kandeler

Maemo: Make size of package manager icon more clear.

Task-number: QTCREATORBUG-2993
parent 3d1f23b7
......@@ -139,10 +139,12 @@ void MaemoPackageCreationWidget::updatePackageManagerIcon(const ProjectExplorer:
QString error;
const QIcon &icon
= MaemoTemplatesManager::instance()->packageManagerIcon(project, &error);
if (!error.isEmpty())
if (!error.isEmpty()) {
QMessageBox::critical(this, tr("Could not read icon"), error);
else
} else {
m_ui->packageManagerIconButton->setIcon(icon);
m_ui->packageManagerIconButton->setIconSize(m_ui->packageManagerIconButton->size());
}
}
void MaemoPackageCreationWidget::setPackageManagerIcon()
......@@ -153,7 +155,8 @@ void MaemoPackageCreationWidget::setPackageManagerIcon()
imageFilter += "*." + QString::fromAscii(imageType) + QLatin1Char(' ');
imageFilter += QLatin1Char(')');
const QString iconFileName = QFileDialog::getOpenFileName(this,
tr("Choose Image"), QString(), imageFilter);
tr("Choose Image (will be scaled to 48x48 pixels if necessary)"),
QString(), imageFilter);
if (!iconFileName.isEmpty()) {
QString error;
if (!MaemoTemplatesManager::instance()->setPackageManagerIcon(m_step->
......
......@@ -192,6 +192,12 @@
</item>
<item row="2" column="0">
<widget class="QLabel" name="packageManagerIconLabel">
<property name="minimumSize">
<size>
<width>0</width>
<height>48</height>
</size>
</property>
<property name="text">
<string>&lt;b&gt;Package Manager icon:&lt;/b&gt;</string>
</property>
......@@ -201,6 +207,21 @@
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QToolButton" name="packageManagerIconButton">
<property name="minimumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="toolTip">
<string>Size is 48x48 pixels</string>
</property>
<property name="text">
<string/>
</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment