Commit 9cbd95e7 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

A bit more modern version of the About dialog

parent 34e1e7dc
...@@ -83,53 +83,51 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf) ...@@ -83,53 +83,51 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf)
{ {
/* Build UI */ /* Build UI */
ui.setupUi( this ); ui.setupUi( this );
ui.closeButtonBox->addButton(
new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole );
setWindowTitle( qtr( "About" ) ); setWindowTitle( qtr( "About" ) );
setWindowRole( "vlc-about" ); setWindowRole( "vlc-about" );
setMinimumSize( 600, 500 );
resize( 600, 500 );
setWindowModality( Qt::WindowModal ); setWindowModality( Qt::WindowModal );
CONNECT( ui.closeButtonBox, rejected(), this, close() ); ui.version->setText(qfu( " " VERSION_MESSAGE ) );
ui.closeButtonBox->setFocus(); #if 0
ui.introduction->setText(
qtr( "VLC media player" ) + qfu( " " VERSION_MESSAGE ) );
if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) ) if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) )
ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128-xmas.png" ) ); ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128-xmas.png" ) );
else else
ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128.png" ) ); ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128.png" ) );
#endif
/* Main Introduction */ #if 0
ui.infoLabel->setText( ifdef UPDATE_CHECK
qtr( "VLC media player is a free media player, " #else
"encoder and streamer that can read from files, " ui.update->hide();
"CDs, DVDs, network streams, capture cards and even more!\n" #endif
"VLC uses its internal codecs and works on essentially every "
"popular platform.\n\n" )
+ qtr( "This version of VLC was compiled by:\n" )
+ qfu( VLC_CompileBy() )+ " on " + qfu( VLC_CompileHost() ) +
+ " ("__DATE__" "__TIME__").\n"
+ qtr( "Compiler: " ) + qfu( VLC_Compiler() ) + ".\n"
+ qtr( "You are using the Qt Interface.\n\n" )
+ qtr( "Copyright (C) " ) + COPYRIGHT_YEARS
+ qtr( " by the VideoLAN Team.\n" )
+ "<a href=\"http://www.videolan.org\">http://www.videolan.org</a>" );
/* Be translators friendly: Convert to rich text */
ui.infoLabel->setText( ui.infoLabel->text().replace( "\n", "<br/>" ) );
/* GPL License */ /* GPL License */
ui.licenseEdit->setText( qfu( psz_license ) ); ui.licensePage->setText( qfu( psz_license ) );
/* People who helped */ /* People who helped */
ui.thanksEdit->setText( qfu( psz_thanks ) ); ui.creditPage->setText( qfu( psz_thanks ) );
/* People who wrote the software */ /* People who wrote the software */
ui.authorsEdit->setText( qfu( psz_authors ) ); ui.authorsPage->setText( qfu( psz_authors ) );
BUTTONACT(ui.licenseButton, showLicense() );
BUTTONACT(ui.authorsButton, showAuthors() );
BUTTONACT(ui.creditsButton, showCredit() );
}
void AboutDialog::showLicense()
{
ui.stackedWidget->setCurrentWidget( ui.licensePage );
}
void AboutDialog::showAuthors()
{
ui.stackedWidget->setCurrentWidget( ui.authorsPage );
}
void AboutDialog::showCredit()
{
ui.stackedWidget->setCurrentWidget( ui.creditPage );
} }
#ifdef UPDATE_CHECK #ifdef UPDATE_CHECK
......
...@@ -58,9 +58,12 @@ private: ...@@ -58,9 +58,12 @@ private:
Ui::aboutWidget ui; Ui::aboutWidget ui;
public slots: public slots:
virtual void close() { toggleVisible(); }
friend class Singleton<AboutDialog>; friend class Singleton<AboutDialog>;
private slots:
void showLicense();
void showAuthors();
void showCredit();
}; };
#ifdef UPDATE_CHECK #ifdef UPDATE_CHECK
......
...@@ -6,162 +6,290 @@ ...@@ -6,162 +6,290 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>520</width> <width>744</width>
<height>357</height> <height>360</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>About</string> <string>Dialog</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item row="0" column="0"> <property name="spacing">
<widget class="QTabWidget" name="tabWidget"> <number>0</number>
<property name="currentIndex"> </property>
<number>0</number> <property name="margin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="horizontalFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<widget class="QWidget" name="tab"> <property name="minimumSize">
<attribute name="title"> <size>
<string>Version</string> <width>0</width>
</attribute> <height>300</height>
<layout class="QGridLayout" name="gridLayout_2"> </size>
<item row="0" column="1"> </property>
<widget class="QLabel" name="introduction"> <property name="styleSheet">
<property name="sizePolicy"> <string notr="true">background-color: rgb(222, 222, 222);
<sizepolicy hsizetype="Minimum" vsizetype="Maximum"> background-color: rgb(245, 245, 245);</string>
<horstretch>0</horstretch> </property>
<verstretch>0</verstretch> <layout class="QGridLayout" name="gridLayout">
</sizepolicy> <item row="0" column="0" rowspan="6">
</property> <widget class="QLabel" name="VLCcone">
<property name="minimumSize"> <property name="sizePolicy">
<size> <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<width>0</width> <horstretch>0</horstretch>
<height>40</height> <verstretch>0</verstretch>
</size> </sizepolicy>
</property> </property>
<property name="font"> <property name="minimumSize">
<font> <size>
<weight>75</weight> <width>247</width>
<bold>true</bold> <height>300</height>
</font> </size>
</property> </property>
<property name="text"> <property name="autoFillBackground">
<string notr="true">introduction</string> <bool>false</bool>
</property> </property>
<property name="textInteractionFlags"> <property name="lineWidth">
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <number>0</number>
</property> </property>
</widget> <property name="text">
</item> <string/>
<item row="1" column="1"> </property>
<widget class="QLabel" name="infoLabel"> <property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="pixmap">
<pixmap>:/logo/vlc256.png</pixmap>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
<property name="margin">
<number>20</number>
</property>
</widget>
</item>
<item row="2" column="2" rowspan="4">
<widget class="QStackedWidget" name="stackedWidget">
<property name="lineWidth">
<number>0</number>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="blablaPage">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <layout class="QVBoxLayout" name="verticalLayout_2">
<string notr="true">infoLabel</string> <property name="margin">
</property> <number>0</number>
<property name="textFormat"> </property>
<enum>Qt::RichText</enum> <item>
</property> <widget class="QWidget" name="update" native="true">
<property name="wordWrap"> <layout class="QHBoxLayout" name="updateLayout">
<bool>true</bool> <item>
</property> <widget class="QLabel" name="UpdateLabel">
<property name="openExternalLinks"> <property name="sizePolicy">
<bool>true</bool> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
</property> <horstretch>0</horstretch>
<property name="textInteractionFlags"> <verstretch>0</verstretch>
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse</set> </sizepolicy>
</property> </property>
<property name="styleSheet">
<string notr="true">margin-bottom: 8px;margin-top: 4px;</string>
</property>
<property name="text">
<string>Update</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="checkUpdates">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Update</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="MainBlabla">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">padding-right: 20px;</string>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;VLC media player is a free and open source media player, encoder and streamer made by the volunteers of the &lt;a href=&quot;http://www.videolan.org/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0057ae;&quot;&gt;VideoLAN&lt;/span&gt;&lt;/a&gt; community.&lt;/p&gt;&lt;p&gt;VLC uses its internal codecs and works on essentially every popular platform and can read almost every files, CDs, DVDs, network streams, capture cards and other media formats!&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.videolan.org/contribute/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0057ae;&quot;&gt;Help and join us!&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> <widget class="QTextEdit" name="licensePage">
<item row="0" column="0" rowspan="2"> <property name="frameShadow">
<widget class="QLabel" name="iconVLC"> <enum>QFrame::Plain</enum>
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="text">
<string notr="true">iconVLC</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Authors</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTextEdit" name="authorsEdit">
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property> </property>
</widget> </widget>
</item> <widget class="QTextEdit" name="authorsPage">
</layout> <property name="frameShadow">
</widget> <enum>QFrame::Plain</enum>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>Thanks</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>We would like to thank the whole VLC community, the testers, our users and the following people (and the missing ones...) for their collaboration to create the best free software.</string>
</property> </property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="thanksEdit">
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <set>Qt::NoTextInteraction</set>
</property> </property>
</widget> </widget>
</item> <widget class="QTextEdit" name="creditPage">
</layout> <property name="frameShadow">
</widget> <enum>QFrame::Plain</enum>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>Licence</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QTextEdit" name="licenseEdit">
<property name="font">
<font>
<family>Courier</family>
</font>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum>
</property>
<property name="acceptRichText">
<bool>false</bool>
</property> </property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse</set>
</property> </property>
</widget> </widget>
</item> </widget>
</layout> </item>
</widget> <item row="0" column="2">
<widget class="QLabel" name="title">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">margin-top: 10px</string>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:26pt; color:#353535;&quot;&gt;VLC media player&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="version">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">font: 75 12pt &quot;Sans Serif&quot;;
margin-bottom: 6px;</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item>
<widget class="QDialogButtonBox" name="closeButtonBox"> <widget class="QFrame" name="footer">
<property name="standardButtons"> <property name="sizePolicy">
<set>QDialogButtonBox::NoButton</set> <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(201, 201, 201);
background-color: rgb(230, 230, 230);</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="authorsButton">
<property name="styleSheet">
<string notr="true">padding: 10px</string>
</property>
<property name="text">
<string>Authors</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="licenseButton">
<property name="styleSheet">
<string notr="true">padding: 10px</string>
</property>
<property name="text">
<string>License</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="creditsButton">
<property name="styleSheet">
<string notr="true">padding: 10px;</string>
</property>
<property name="text">
<string>Credits</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
</layout> </layout>
......
<RCC> <RCC>
<qresource prefix="/logo"> <qresource prefix="/logo">
<file alias="vlc256.png">../../../share/icons/256x256/vlc.png</file>
<file alias="vlc128.png">../../../share/icons/128x128/vlc.png</file> <file alias="vlc128.png">../../../share/icons/128x128/vlc.png</file>
<file alias="vlc16.png">../../../share/icons/16x16/vlc.png</file> <file alias="vlc16.png">../../../share/icons/16x16/vlc.png</file>
<file alias="vlc48.png">../../../share/icons/48x48/vlc.png</file> <file alias="vlc48.png">../../../share/icons/48x48/vlc.png</file>
......
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