Add a checkbox for zach to move the cover art above the status bar.
This commit is contained in:
parent
67bc9351bd
commit
349acc1803
|
@ -803,6 +803,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr ""
|
||||
|
|
|
@ -805,6 +805,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "disk %1"
|
||||
|
|
|
@ -808,6 +808,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "disk %1"
|
||||
|
|
|
@ -807,6 +807,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "CD %1"
|
||||
|
|
|
@ -810,6 +810,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "δίσκος %1"
|
||||
|
|
|
@ -807,6 +807,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "disc %1"
|
||||
|
|
|
@ -804,6 +804,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "disc %1"
|
||||
|
|
|
@ -810,6 +810,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "Disco %1"
|
||||
|
|
|
@ -803,6 +803,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr ""
|
||||
|
|
|
@ -807,6 +807,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "CD %1"
|
||||
|
|
|
@ -805,6 +805,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "disco %1"
|
||||
|
|
|
@ -810,6 +810,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "disco %1"
|
||||
|
|
|
@ -805,6 +805,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr ""
|
||||
|
|
|
@ -805,6 +805,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "disk %1"
|
||||
|
|
|
@ -803,6 +803,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "CD %1"
|
||||
|
|
|
@ -805,6 +805,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "dysk %1"
|
||||
|
|
|
@ -808,6 +808,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "disco %1"
|
||||
|
|
|
@ -810,6 +810,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "disco %1"
|
||||
|
|
|
@ -804,6 +804,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "disc %1"
|
||||
|
|
|
@ -808,6 +808,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "диск %1"
|
||||
|
|
|
@ -808,6 +808,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "disk %1"
|
||||
|
|
|
@ -806,6 +806,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr "skiva %1"
|
||||
|
|
|
@ -803,6 +803,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr ""
|
||||
|
|
|
@ -803,6 +803,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr ""
|
||||
|
|
|
@ -803,6 +803,9 @@ msgstr ""
|
|||
msgid "Large album cover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show above status bar"
|
||||
msgstr ""
|
||||
|
||||
#, qt-format
|
||||
msgid "disc %1"
|
||||
msgstr ""
|
||||
|
|
|
@ -468,6 +468,9 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg
|
|||
1); // Don't question the 1
|
||||
connect(playlists_, SIGNAL(CurrentSongChanged(Song)), ui_->now_playing, SLOT(NowPlaying(Song)));
|
||||
connect(player_, SIGNAL(Stopped()), ui_->now_playing, SLOT(Stopped()));
|
||||
connect(ui_->now_playing, SIGNAL(ShowAboveStatusBarChanged(bool)),
|
||||
SLOT(NowPlayingWidgetPositionChanged(bool)));
|
||||
NowPlayingWidgetPositionChanged(ui_->now_playing->show_above_status_bar());
|
||||
|
||||
// Load theme
|
||||
StyleSheetLoader* css_loader = new StyleSheetLoader(this);
|
||||
|
@ -1219,3 +1222,14 @@ void MainWindow::TaskCountChanged(int count) {
|
|||
ui_->status_bar_stack->setCurrentWidget(ui_->multi_loading_indicator);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::NowPlayingWidgetPositionChanged(bool above_status_bar) {
|
||||
if (above_status_bar) {
|
||||
ui_->status_bar->setParent(ui_->centralWidget);
|
||||
} else {
|
||||
ui_->status_bar->setParent(ui_->player_controls_container);
|
||||
}
|
||||
|
||||
ui_->status_bar->parentWidget()->layout()->addWidget(ui_->status_bar);
|
||||
ui_->status_bar->show();
|
||||
}
|
||||
|
|
|
@ -153,6 +153,8 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
|||
|
||||
void CheckForUpdates();
|
||||
|
||||
void NowPlayingWidgetPositionChanged(bool above_status_bar);
|
||||
|
||||
private:
|
||||
void SaveGeometry();
|
||||
void AddFilesToPlaylist(bool clear_first, const QList<QUrl>& urls);
|
||||
|
|
|
@ -163,258 +163,288 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="player_controls">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
<widget class="QWidget" name="player_controls_container" native="true">
|
||||
<layout class="QVBoxLayout" name="status_bar_layout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="player_controls">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QToolButton" name="back_button">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="pause_play_button">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="stop_button">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::MenuButtonPopup</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="forward_button">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="last_fm_controls" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QToolButton" name="back_button">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="Line" name="lastfm_line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="love_button">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="ban_button">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="AnalyzerContainer" name="analyzer" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Amarok::VolumeSlider" name="volume">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="status_bar_line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="status_bar" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="status_bar_stack">
|
||||
<widget class="MultiLoadingIndicator" name="multi_loading_indicator"/>
|
||||
<widget class="QWidget" name="playlist_summary_page">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="pause_play_button">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="stop_button">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::MenuButtonPopup</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="forward_button">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="last_fm_controls" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="playlist_summary">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<widget class="Line" name="lastfm_line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="love_button">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="ban_button">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="PlaylistSequence" name="playlist_sequence" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="TrackSlider" name="track_slider" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="AnalyzerContainer" name="analyzer" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>100</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Amarok::VolumeSlider" name="volume">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="status_bar" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="Line" name="status_bar_line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="status_bar_internal" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="status_bar_stack">
|
||||
<widget class="MultiLoadingIndicator" name="multi_loading_indicator"/>
|
||||
<widget class="QWidget" name="playlist_summary_page">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="playlist_summary">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="PlaylistSequence" name="playlist_sequence" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="TrackSlider" name="track_slider" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>10</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
@ -430,7 +460,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1131</width>
|
||||
<height>23</height>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuMusic">
|
||||
|
|
|
@ -49,6 +49,7 @@ NowPlayingWidget::NowPlayingWidget(QWidget *parent)
|
|||
network_(NULL),
|
||||
mode_(SmallSongDetails),
|
||||
menu_(new QMenu(this)),
|
||||
above_statusbar_action_(NULL),
|
||||
visible_(false),
|
||||
small_ideal_height_(0),
|
||||
cover_height_(0),
|
||||
|
@ -66,10 +67,16 @@ NowPlayingWidget::NowPlayingWidget(QWidget *parent)
|
|||
// Context menu
|
||||
QActionGroup* mode_group = new QActionGroup(this);
|
||||
QSignalMapper* mode_mapper = new QSignalMapper(this);
|
||||
connect(mode_mapper, SIGNAL(mapped(int)), SLOT(SetMode(int)));
|
||||
CreateModeAction(SmallSongDetails, tr("Small album cover"), mode_group, mode_mapper);
|
||||
CreateModeAction(LargeSongDetails, tr("Large album cover"), mode_group, mode_mapper);
|
||||
|
||||
menu_->addActions(mode_group->actions());
|
||||
connect(mode_mapper, SIGNAL(mapped(int)), SLOT(SetMode(int)));
|
||||
menu_->addSeparator();
|
||||
above_statusbar_action_ = menu_->addAction(tr("Show above status bar"));
|
||||
above_statusbar_action_->setCheckable(true);
|
||||
connect(above_statusbar_action_, SIGNAL(toggled(bool)), SLOT(ShowAboveStatusBar(bool)));
|
||||
above_statusbar_action_->setChecked(s.value("above_status_bar", false).toBool());
|
||||
|
||||
// Animations
|
||||
connect(show_hide_animation_, SIGNAL(frameChanged(int)), SLOT(SetHeight(int)));
|
||||
|
@ -305,3 +312,15 @@ void NowPlayingWidget::resizeEvent(QResizeEvent* e) {
|
|||
void NowPlayingWidget::contextMenuEvent(QContextMenuEvent* e) {
|
||||
menu_->popup(mapToGlobal(e->pos()));
|
||||
}
|
||||
|
||||
void NowPlayingWidget::ShowAboveStatusBar(bool above) {
|
||||
QSettings s;
|
||||
s.beginGroup(kSettingsGroup);
|
||||
s.setValue("above_status_bar", above);
|
||||
|
||||
emit ShowAboveStatusBarChanged(above);
|
||||
}
|
||||
|
||||
bool NowPlayingWidget::show_above_status_bar() const {
|
||||
return above_statusbar_action_->isChecked();
|
||||
}
|
||||
|
|
|
@ -53,8 +53,13 @@ public:
|
|||
void set_network(NetworkAccessManager* network) { network_ = network; }
|
||||
void set_ideal_height(int height);
|
||||
|
||||
bool show_above_status_bar() const;
|
||||
|
||||
QSize sizeHint() const;
|
||||
|
||||
signals:
|
||||
void ShowAboveStatusBarChanged(bool above);
|
||||
|
||||
public slots:
|
||||
void NowPlaying(const Song& metadata);
|
||||
void Stopped();
|
||||
|
@ -66,6 +71,7 @@ protected:
|
|||
|
||||
private slots:
|
||||
void SetMode(int mode);
|
||||
void ShowAboveStatusBar(bool above);
|
||||
|
||||
void CoverLoaderInitialised();
|
||||
void AlbumArtLoaded(quint64 id, const QImage& image);
|
||||
|
@ -89,6 +95,7 @@ private:
|
|||
Mode mode_;
|
||||
|
||||
QMenu* menu_;
|
||||
QAction* above_statusbar_action_;
|
||||
|
||||
bool visible_;
|
||||
int small_ideal_height_;
|
||||
|
|
Loading…
Reference in New Issue