Commit 5705cd99 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

MeeGo: Use recommended package manager icon size.

Task-number: QTCREATORBUG-5487

Change-Id: Ic0a25dcc26d835d1bddf267c0cfc50486e8eb878
Reviewed-on: http://codereview.qt.nokia.com/1752

Reviewed-by: default avatarChristian Kandeler <christian.kandeler@nokia.com>
parent d1bbdf5f
......@@ -76,6 +76,10 @@ void MaemoPackageCreationWidget::initGui()
const AbstractDebBasedQt4MaemoTarget * const debBasedMaemoTarget
= m_step->debBasedMaemoTarget();
if (debBasedMaemoTarget) {
const QSize iconSize = debBasedMaemoTarget->packageManagerIconSize();
m_ui->packageManagerIconButton->setFixedSize(iconSize);
m_ui->packageManagerIconButton->setToolTip(tr("Size should be %1x%2 pixels")
.arg(iconSize.width()).arg(iconSize.height()));
m_ui->editSpecFileButton->setVisible(false);
updateDebianFileList();
handleControlFileUpdate();
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>584</width>
<width>615</width>
<height>284</height>
</rect>
</property>
......@@ -191,20 +191,8 @@
<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>
<string/>
</property>
<property name="text">
<string/>
......
......@@ -454,7 +454,7 @@ bool AbstractDebBasedQt4MaemoTarget::setPackageManagerIconInternal(const QString
QByteArray iconAsBase64;
QBuffer buffer(&iconAsBase64);
buffer.open(QIODevice::WriteOnly);
if (!pixmap.scaled(48, 48).save(&buffer,
if (!pixmap.scaled(packageManagerIconSize()).save(&buffer,
QFileInfo(iconFilePath).suffix().toAscii())) {
if (error)
*error = tr("Could not export image file '%1'.").arg(iconFilePath);
......@@ -1069,6 +1069,11 @@ QByteArray Qt4Maemo5Target::packageManagerNameFieldName() const
return "XB-Maemo-Display-Name";
}
QSize Qt4Maemo5Target::packageManagerIconSize() const
{
return QSize(48, 48);
}
QByteArray Qt4Maemo5Target::defaultSection() const
{
return "user/hidden";
......@@ -1114,6 +1119,11 @@ QByteArray Qt4HarmattanTarget::packageManagerNameFieldName() const
return "XSBC-Maemo-Display-Name";
}
QSize Qt4HarmattanTarget::packageManagerIconSize() const
{
return QSize(64, 64);
}
QByteArray Qt4HarmattanTarget::defaultSection() const
{
return "user/other";
......
......@@ -132,6 +132,8 @@ public:
bool setPackageManagerName(const QString &name, QString *error = 0);
QString packageManagerName() const;
virtual QSize packageManagerIconSize() const=0;
signals:
void debianDirContentsChanged();
void changeLogChanged();
......@@ -235,6 +237,8 @@ public:
virtual bool allowsPackagingDisabling() const { return true; }
virtual bool allowsQmlDebugging() const { return false; }
virtual QSize packageManagerIconSize() const;
static QString defaultDisplayName();
private:
......@@ -257,6 +261,8 @@ public:
virtual bool allowsPackagingDisabling() const { return false; }
virtual bool allowsQmlDebugging() const { return true; }
virtual QSize packageManagerIconSize() const;
static QString defaultDisplayName();
static QString aegisManifestFileName();
......
Supports Markdown
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