]> git.sesse.net Git - vlc/commitdiff
About: make the label look like links
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 16 Apr 2013 14:08:26 +0000 (16:08 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 16 Apr 2013 14:08:26 +0000 (16:08 +0200)
modules/gui/qt4/dialogs/help.cpp
modules/gui/qt4/ui/about.ui

index 19c404df4019cdd1368a8f7a1cb156c641bf115b..8db3dbe97563060b9f19080c00dfcda676a3c4b3 100644 (file)
@@ -110,9 +110,9 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf)
     /* People who wrote the software */
     ui.authorsPage->setText( qfu( psz_authors ) );
 
-    BUTTONACT(ui.licenseButton, showLicense() );
-    BUTTONACT(ui.authorsButton, showAuthors() );
-    BUTTONACT(ui.creditsButton,  showCredit() );
+    ui.licenseButton->installEventFilter( this );
+    ui.authorsButton->installEventFilter( this );
+    ui.creditsButton->installEventFilter( this );
 
     ui.version->installEventFilter( this );
 }
@@ -134,9 +134,9 @@ void AboutDialog::showCredit()
 
 bool AboutDialog::eventFilter(QObject *obj, QEvent *event)
 {
-    if( obj == ui.version )
+    if (event->type() == QEvent::MouseButtonPress )
     {
-        if (event->type() == QEvent::MouseButtonPress )
+        if( obj == ui.version )
         {
             if( !b_advanced )
             {
@@ -151,6 +151,13 @@ bool AboutDialog::eventFilter(QObject *obj, QEvent *event)
             }
             return true;
         }
+        else if( obj == ui.licenseButton )
+            showLicense();
+        else if( obj == ui.authorsButton )
+            showAuthors();
+        else if( obj == ui.creditsButton )
+            showCredit();
+
         return false;
     }
 
index 9a92ece7590d2814a9c273e5149b5a5c9dbe52d0..2ebeedfe95b976320c1c3fdd3fb3110046ae2f6b 100644 (file)
@@ -279,41 +279,50 @@ background-color: rgb(230, 230, 230);</string>
        <number>0</number>
       </property>
       <item>
-       <widget class="QToolButton" name="authorsButton">
+       <widget class="QLabel" name="authorsButton">
+        <property name="cursor">
+         <cursorShape>PointingHandCursor</cursorShape>
+        </property>
         <property name="styleSheet">
          <string notr="true">padding: 10px</string>
         </property>
         <property name="text">
-         <string>Authors</string>
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; text-decoration: underline; color:#0057ae;&quot;&gt;Authors&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
         </property>
-        <property name="autoRaise">
-         <bool>true</bool>
+        <property name="alignment">
+         <set>Qt::AlignCenter</set>
         </property>
        </widget>
       </item>
       <item>
-       <widget class="QToolButton" name="licenseButton">
+       <widget class="QLabel" name="licenseButton">
+        <property name="cursor">
+         <cursorShape>PointingHandCursor</cursorShape>
+        </property>
         <property name="styleSheet">
          <string notr="true">padding: 10px</string>
         </property>
         <property name="text">
-         <string>License</string>
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; text-decoration: underline; color:#0057ae;&quot;&gt;License&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
         </property>
-        <property name="autoRaise">
-         <bool>true</bool>
+        <property name="alignment">
+         <set>Qt::AlignCenter</set>
         </property>
        </widget>
       </item>
       <item>
-       <widget class="QToolButton" name="creditsButton">
+       <widget class="QLabel" name="creditsButton">
+        <property name="cursor">
+         <cursorShape>PointingHandCursor</cursorShape>
+        </property>
         <property name="styleSheet">
          <string notr="true">padding: 10px;</string>
         </property>
         <property name="text">
-         <string>Credits</string>
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; text-decoration: underline; color:#0057ae;&quot;&gt;Credits&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
         </property>
-        <property name="autoRaise">
-         <bool>true</bool>
+        <property name="alignment">
+         <set>Qt::AlignCenter</set>
         </property>
        </widget>
       </item>