]> git.sesse.net Git - vlc/commitdiff
EPG: fix QLabel look and saveGeometry
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 28 Jan 2010 02:29:29 +0000 (03:29 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 28 Jan 2010 02:30:05 +0000 (03:30 +0100)
modules/gui/qt4/dialogs/epg.cpp
modules/gui/qt4/dialogs/epg.hpp

index 10e7b4e33f0205bbfce4e530cf9469143be70030..bea56e9528f5811e5aa43b6cb446f5f2fd560afe 100644 (file)
@@ -55,6 +55,8 @@ EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
     description = new QLabel( this );
     description->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel );
     description->setAutoFillBackground( true );
+    description->setWordWrap( true );
+    description->setAlignment( Qt::AlignLeft | Qt::AlignTop );
 
     QPalette palette;
     palette.setBrush(QPalette::Active, QPalette::Window, palette.brush( QPalette::Base ) );
@@ -73,18 +75,19 @@ EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
 
     QPushButton *update = new QPushButton( "Update" ); //Temporary to test
     layout->addWidget( update, 0, Qt::AlignRight );
-    BUTTONACT( update, update() );
+    BUTTONACT( update, updateInfos() );
 
     QPushButton *close = new QPushButton( qtr( "&Close" ) );
     layout->addWidget( close, 0, Qt::AlignRight );
     BUTTONACT( close, close() );
 
-
-    resize( 650, 400 );
+    updateInfos();
+    readSettings( "EPGDialog", QSize( 650, 450 ) );
 }
 
 EpgDialog::~EpgDialog()
 {
+    writeSettings( "EPGDialog" );
 }
 
 void EpgDialog::showEvent( EPGEvent *event )
@@ -98,7 +101,7 @@ void EpgDialog::showEvent( EPGEvent *event )
         description->setText( event->shortDescription );
 }
 
-void EpgDialog::update()
+void EpgDialog::updateInfos()
 {
     if( !THEMIM->getInput() ) return;
 
index fb2993f16990f169707c18d6c7fccdc695ec4fdf..d8d24a1fc2ae6c5eafbd707cd346cf9e954c4b29 100644 (file)
@@ -45,7 +45,7 @@ private:
 
 private slots:
     void showEvent( EPGEvent * );
-    void update();
+    void updateInfos();
 };
 
 #endif