[PC-BSD Commits] r9777 - pcbsd/current/src-qt4/pc-softwaremanager
svn at pcbsd.org
svn at pcbsd.org
Thu Mar 24 10:39:37 PDT 2011
Author: kris
Date: 2011-03-24 10:39:37 -0700 (Thu, 24 Mar 2011)
New Revision: 9777
Modified:
pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui
pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp
Log:
Updated the AppCafe, show names and versions of latest releases, and changed
scroll area background to match the rest of the UI
Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui 2011-03-24 15:47:23 UTC (rev 9776)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui 2011-03-24 17:39:37 UTC (rev 9777)
@@ -134,22 +134,28 @@
</item>
<item row="1" column="0">
<widget class="QScrollArea" name="scrollAreaPBI">
- <property name="styleSheet">
- <string notr="true">background-color: rgb(255, 255, 255);</string>
+ <property name="autoFillBackground">
+ <bool>false</bool>
</property>
<property name="frameShadow">
- <enum>QFrame::Plain</enum>
+ <enum>QFrame::Raised</enum>
</property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
<property name="widgetResizable">
<bool>true</bool>
</property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>545</width>
- <height>388</height>
+ <width>543</width>
+ <height>386</height>
</rect>
</property>
</widget>
Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp 2011-03-24 15:47:23 UTC (rev 9776)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp 2011-03-24 17:39:37 UTC (rev 9777)
@@ -900,24 +900,36 @@
latestWidget->setTitle(tr("Latest Releases"));
QHBoxLayout *latestLayout = new QHBoxLayout();
- QStringList latestApps = getLatestPBIs(6, pbiRepos->getID(curRepo));
+ QStringList latestApps = getLatestPBIs(4, pbiRepos->getID(curRepo));
for ( int i = 0; i < latestApps.length(); i++) {
clickedWidget *lWidget = new clickedWidget(0, latestApps.at(i));
- QHBoxLayout *iLayout = new QHBoxLayout();
+ QVBoxLayout *iLayout = new QVBoxLayout();
+ iLayout->setAlignment(Qt::AlignCenter);
// Find the correct PBI we are working on
for ( int z = 0; z < pbiAvail->count(); z++ ) {
if ( latestApps.at(i) != pbiAvail->getName(z) || pbiAvail->getRepo(z) != pbiRepos->getID(curRepo))
continue;
+ QWidget *sWidget = new QWidget();
+ QGridLayout *sLayout = new QGridLayout();
+ sLayout->setAlignment(Qt::AlignCenter);
+
QPixmap pIcon(pbiAvail->getIcon(z));
QLabel *pIconLabel = new QLabel();
pIconLabel->setPixmap(pIcon.scaled(32,32, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
- pIconLabel->setAlignment(Qt::AlignCenter);
pIconLabel->setMinimumSize(32,32);
pIconLabel->setMaximumSize(32,32);
+ pIconLabel->setAlignment(Qt::AlignCenter);
pIconLabel->setToolTip(pbiAvail->getName(z) + " " + pbiAvail->getVer(z));
- iLayout->addWidget(pIconLabel);
+ sLayout->addWidget(pIconLabel, 0, 0);
+ sWidget->setLayout(sLayout);
+ iLayout->addWidget(sWidget);
+
+ QLabel *pLabel = new QLabel();
+ pLabel->setAlignment(Qt::AlignCenter);
+ pLabel->setText(pbiAvail->getName(z) + " " + pbiAvail->getVer(z));
+ iLayout->addWidget(pLabel);
}
lWidget->setLayout(iLayout);
latestLayout->addWidget(lWidget);
More information about the Commits
mailing list