[PC-BSD Commits] r12716 - pcbsd/current/src-qt4/pc-softwaremanager

svn at pcbsd.org svn at pcbsd.org
Thu Sep 8 08:27:17 PDT 2011


Author: kris
Date: 2011-09-08 08:27:16 -0700 (Thu, 08 Sep 2011)
New Revision: 12716

Modified:
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui
   pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp
Log:

Improve AppCafe, now PBI descriptions can include HTML to improve their formatting, support web links, etc. 



Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h	2011-09-08 14:58:31 UTC (rev 12715)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.h	2011-09-08 15:27:16 UTC (rev 12716)
@@ -21,6 +21,7 @@
 #include <QMessageBox>
 #include <QProcess>
 #include <QScrollArea>
+#include <QTextBrowser>
 
 /* Local Includes */
 #include "classes.h"

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui	2011-09-08 14:58:31 UTC (rev 12715)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-main.ui	2011-09-08 15:27:16 UTC (rev 12716)
@@ -134,6 +134,9 @@
         </item>
         <item row="1" column="0">
          <widget class="QStackedWidget" name="browseStack">
+          <property name="styleSheet">
+           <string notr="true">background-color: rgb(255, 255, 255);</string>
+          </property>
           <property name="currentIndex">
            <number>-1</number>
           </property>
@@ -300,8 +303,8 @@
     <rect>
      <x>0</x>
      <y>0</y>
-     <width>575</width>
-     <height>22</height>
+     <width>675</width>
+     <height>19</height>
     </rect>
    </property>
    <widget class="QMenu" name="menu_File">

Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp	2011-09-08 14:58:31 UTC (rev 12715)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp	2011-09-08 15:27:16 UTC (rev 12716)
@@ -391,9 +391,13 @@
 	layoutBrowser->addWidget(bottomLine, 4, 0, 1, 2);
 
 	// Create the PBI description
-	QLabel *pDesc = new QLabel(pbiAvail->getDesc(pbiNum));
-	pDesc->setAlignment(Qt::AlignLeft);
-	pDesc->setWordWrap(true);
+	QTextBrowser *pDesc = new QTextBrowser();
+	pDesc->setHtml(pbiAvail->getDesc(pbiNum));
+        pDesc->setFrameStyle(QFrame::NoFrame);
+        pDesc->setOpenExternalLinks(true);
+        pDesc->setAlignment(Qt::AlignLeft);
+        pDesc->setFixedHeight(120);
+        pDesc->setBackgroundRole(QPalette::NoRole);
 	pDesc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
 	layoutBrowser->addWidget(pDesc, 5, 0, 1, 2);
 



More information about the Commits mailing list