diff options
Diffstat (limited to 'lumina-fm')
-rw-r--r-- | lumina-fm/MainUI.cpp | 2 | ||||
-rw-r--r-- | lumina-fm/widgets/DirWidget.cpp | 4 | ||||
-rw-r--r-- | lumina-fm/widgets/DirWidget.ui | 117 | ||||
-rw-r--r-- | lumina-fm/widgets/MultimediaWidget.cpp | 6 | ||||
-rw-r--r-- | lumina-fm/widgets/MultimediaWidget.h | 1 |
5 files changed, 64 insertions, 66 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index 15b0f93e..1a73966e 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -521,6 +521,8 @@ void MainUI::tabClosed(int tab){ break; } } + }else if(info=="#MW"){ + MW->Cleanup(); //prepare it to be hidden/removed } //Remove the tab (will automatically move to a different one); qDebug() << "Closing tab:" << tab << tabBar->tabText(tab); diff --git a/lumina-fm/widgets/DirWidget.cpp b/lumina-fm/widgets/DirWidget.cpp index 775a252b..98589164 100644 --- a/lumina-fm/widgets/DirWidget.cpp +++ b/lumina-fm/widgets/DirWidget.cpp @@ -216,7 +216,7 @@ void DirWidget::LoadDir(QString dir, QList<LFileInfo> list){ it->setText(t,list[i].fileName()); it->setStatusTip(t, list[i].fileName()); if(list[i].isImage()){ - if(showThumbs){ it->setIcon(t, QIcon( QPixmap(list[i].absoluteFilePath()).scaledToHeight(ui->treeWidget->iconSize().height()) ) ); } + if(showThumbs){ it->setIcon(t, QIcon( QPixmap(list[i].absoluteFilePath()).scaled(ui->treeWidget->iconSize(),Qt::IgnoreAspectRatio, Qt::FastTransformation) ) ); } else{ it->setIcon(t, LXDG::findIcon(list[i].iconfile(),"image-x-generic") ); } }else{ it->setIcon(t, LXDG::findIcon(list[i].iconfile(),"unknown") ); @@ -250,7 +250,7 @@ void DirWidget::LoadDir(QString dir, QList<LFileInfo> list){ it->setText(list[i].fileName()); it->setStatusTip(list[i].fileName()); if(list[i].isImage()){ - if(showThumbs){ it->setIcon(QIcon( QPixmap(list[i].absoluteFilePath()).scaledToHeight(ui->treeWidget->iconSize().height()) ) ); } + if(showThumbs){ it->setIcon(QIcon( QPixmap(list[i].absoluteFilePath()).scaled(ui->listWidget->iconSize(),Qt::IgnoreAspectRatio, Qt::FastTransformation) ) ); } else{ it->setIcon(LXDG::findIcon(list[i].iconfile(),"image-x-generic") ); } }else{ it->setIcon(LXDG::findIcon(list[i].iconfile(),"unknown") ); diff --git a/lumina-fm/widgets/DirWidget.ui b/lumina-fm/widgets/DirWidget.ui index 9355d21e..42b4a075 100644 --- a/lumina-fm/widgets/DirWidget.ui +++ b/lumina-fm/widgets/DirWidget.ui @@ -7,13 +7,13 @@ <x>0</x> <y>0</y> <width>400</width> - <height>334</height> + <height>349</height> </rect> </property> <property name="windowTitle"> <string>Form</string> </property> - <layout class="QGridLayout" name="gridLayout"> + <layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0" columnstretch="0,1"> <property name="leftMargin"> <number>0</number> </property> @@ -35,19 +35,62 @@ <item row="0" column="0" rowspan="2" colspan="2"> <layout class="QHBoxLayout" name="toolbar_layout"/> </item> - <item row="1" column="1" rowspan="2"> + <item row="3" column="0" colspan="2"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QLabel" name="label_status"> + <property name="text"> + <string notr="true">Status</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="tool_goToImages"> + <property name="statusTip"> + <string>Add selected images to slideshow</string> + </property> + <property name="text"> + <string>Slideshow</string> + </property> + <property name="iconSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="tool_goToPlayer"> + <property name="statusTip"> + <string>Enqueue selection in multimedia player</string> + </property> + <property name="text"> + <string>Play</string> + </property> + <property name="iconSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="1"> <layout class="QVBoxLayout" name="verticalLayout_2"> <property name="spacing"> <number>1</number> </property> <item> - <widget class="QGroupBox" name="group_snaps"> - <property name="title"> - <string notr="true"/> - </property> - <property name="flat"> - <bool>true</bool> - </property> + <widget class="QFrame" name="group_snaps"> <layout class="QHBoxLayout" name="horizontalLayout_3"> <property name="leftMargin"> <number>1</number> @@ -156,16 +199,13 @@ </layout> </item> <item row="2" column="0"> - <widget class="QGroupBox" name="group_actions"> + <widget class="QFrame" name="group_actions"> <property name="sizePolicy"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="title"> - <string/> - </property> <layout class="QVBoxLayout" name="verticalLayout_3"> <property name="leftMargin"> <number>0</number> @@ -395,55 +435,6 @@ </layout> </widget> </item> - <item row="3" column="0" colspan="2"> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <widget class="QLabel" name="label_status"> - <property name="text"> - <string notr="true">Status</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="tool_goToImages"> - <property name="statusTip"> - <string>Add selected images to slideshow</string> - </property> - <property name="text"> - <string>Slideshow</string> - </property> - <property name="iconSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="tool_goToPlayer"> - <property name="statusTip"> - <string>Enqueue selection in multimedia player</string> - </property> - <property name="text"> - <string>Play</string> - </property> - <property name="iconSize"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - </widget> - </item> - </layout> - </item> </layout> <action name="actionBack"> <property name="text"> diff --git a/lumina-fm/widgets/MultimediaWidget.cpp b/lumina-fm/widgets/MultimediaWidget.cpp index 406f9098..851a0b31 100644 --- a/lumina-fm/widgets/MultimediaWidget.cpp +++ b/lumina-fm/widgets/MultimediaWidget.cpp @@ -58,6 +58,10 @@ void MultimediaWidget::LoadMultimedia(QList<LFileInfo> list){ } } +void MultimediaWidget::Cleanup(){ + mediaObj->stop(); //just make sure the player is stopped +} + //Theme change functions void MultimediaWidget::UpdateIcons(){ ui->tool_player_next->setIcon( LXDG::findIcon("media-skip-forward","") ); @@ -159,7 +163,7 @@ void MultimediaWidget::playerError(){ void MultimediaWidget::playerFinished(){ if(ui->combo_player_list->currentIndex()<(ui->combo_player_list->count()-1) && ui->check_player_gotonext->isChecked()){ ui->combo_player_list->setCurrentIndex( ui->combo_player_list->currentIndex()+1 ); - QTimer::singleShot(0,this,SLOT(playerStart())); + QTimer::singleShot(0,this,SLOT(on_tool_player_play_clicked())); }else{ ui->label_player_novideo->setText(tr("Finished")); } diff --git a/lumina-fm/widgets/MultimediaWidget.h b/lumina-fm/widgets/MultimediaWidget.h index 4dc92e39..c579b2dd 100644 --- a/lumina-fm/widgets/MultimediaWidget.h +++ b/lumina-fm/widgets/MultimediaWidget.h @@ -29,6 +29,7 @@ public: public slots: void ClearPlaylist(); void LoadMultimedia(QList<LFileInfo> list); + void Cleanup(); //perform actions necessary when closing the player //Theme change functions void UpdateIcons(); |