diff options
author | Mateusz Łukasik <mati75@linuxmint.pl> | 2015-04-25 16:17:41 +0200 |
---|---|---|
committer | Mateusz Łukasik <mati75@linuxmint.pl> | 2015-04-25 16:17:41 +0200 |
commit | 45ee5ac6dc2159352596ce8e8ec744e0c864d492 (patch) | |
tree | 55ca90fd4a0d5c0eae188c5919510b6b0d2e3c5d /src/skingui | |
parent | a35c74c509f107094fd81cee8df109b652063969 (diff) |
Imported Upstream version 14.9.0.6690~ds0
Diffstat (limited to 'src/skingui')
-rw-r--r-- | src/skingui/actiontools.cpp | 2 | ||||
-rw-r--r-- | src/skingui/actiontools.h | 2 | ||||
-rw-r--r-- | src/skingui/mediabarpanel.cpp | 7 | ||||
-rw-r--r-- | src/skingui/mediabarpanel.h | 3 | ||||
-rw-r--r-- | src/skingui/mediapanel.cpp | 20 | ||||
-rw-r--r-- | src/skingui/mediapanel.h | 9 | ||||
-rw-r--r-- | src/skingui/mybutton.cpp | 2 | ||||
-rw-r--r-- | src/skingui/mybutton.h | 2 | ||||
-rw-r--r-- | src/skingui/myicon.cpp | 2 | ||||
-rw-r--r-- | src/skingui/myicon.h | 2 | ||||
-rw-r--r-- | src/skingui/panelseeker.cpp | 2 | ||||
-rw-r--r-- | src/skingui/panelseeker.h | 2 | ||||
-rw-r--r-- | src/skingui/playcontrol.cpp | 2 | ||||
-rw-r--r-- | src/skingui/playcontrol.h | 2 | ||||
-rw-r--r-- | src/skingui/qpropertysetter.cpp | 2 | ||||
-rw-r--r-- | src/skingui/qpropertysetter.h | 2 | ||||
-rw-r--r-- | src/skingui/skingui.cpp | 21 | ||||
-rw-r--r-- | src/skingui/skingui.h | 3 | ||||
-rw-r--r-- | src/skingui/volumecontrolpanel.cpp | 2 |
19 files changed, 65 insertions, 24 deletions
diff --git a/src/skingui/actiontools.cpp b/src/skingui/actiontools.cpp index 2e11d0b..5ebdb8b 100644 --- a/src/skingui/actiontools.cpp +++ b/src/skingui/actiontools.cpp @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/skingui/actiontools.h b/src/skingui/actiontools.h index 96b1a91..95f81fa 100644 --- a/src/skingui/actiontools.h +++ b/src/skingui/actiontools.h @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/skingui/mediabarpanel.cpp b/src/skingui/mediabarpanel.cpp index fc3bf62..1376c21 100644 --- a/src/skingui/mediabarpanel.cpp +++ b/src/skingui/mediabarpanel.cpp @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify @@ -171,5 +171,10 @@ void MediaBarPanel::setResolutionVisible(bool b) { mediaPanel->setResolutionVisible(b); } +void MediaBarPanel::setScrollingEnabled(bool b) { + qDebug("MediaBarPanel::setScrollingEnabled: %d", b); + mediaPanel->setScrollingEnabled(b); +} + #include "moc_mediabarpanel.cpp" diff --git a/src/skingui/mediabarpanel.h b/src/skingui/mediabarpanel.h index 1493483..ace99be 100644 --- a/src/skingui/mediabarpanel.h +++ b/src/skingui/mediabarpanel.h @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify @@ -71,6 +71,7 @@ public slots: void setVolume(int v); void setSeeker(int v); void setResolutionVisible(bool b); + void setScrollingEnabled(bool b); signals: void volumeChanged(int); diff --git a/src/skingui/mediapanel.cpp b/src/skingui/mediapanel.cpp index db777f7..0138242 100644 --- a/src/skingui/mediapanel.cpp +++ b/src/skingui/mediapanel.cpp @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify @@ -129,6 +129,10 @@ void MediaPanel::setResolutionVisible(bool b) { rearrangeWidgets(b); } +void MediaPanel::setScrollingEnabled(bool b) { + mediaLabel->setScrollingEnabled(b); +} + void MediaPanel::paintEvent(QPaintEvent * e) { QPainter p(this); p.drawPixmap(0,0,leftBackground.width(), 53, leftBackground); @@ -281,8 +285,10 @@ void ScrollingLabel::updateLabel() { scrollPos = 0; } - if (rect.width() > width()) { - timerId = startTimer(20); + if (scrolling_enabled) { + if (rect.width() > width()) { + timerId = startTimer(20); + } } } @@ -292,15 +298,21 @@ void ScrollingLabel::timerEvent(QTimerEvent * t) { update(); } - ScrollingLabel::ScrollingLabel(QWidget* parent ) { scrollPos =0; timerId = -1; + scrolling_enabled = false; textRect = QRect(); setAttribute(Qt::WA_StyledBackground, true); setText("SMPlayer"); } +void ScrollingLabel::setScrollingEnabled(bool b) { + scrolling_enabled = b; + updateLabel(); + repaint(); +} + void ScrollingLabel::resizeEvent(QResizeEvent *) { updateLabel(); } diff --git a/src/skingui/mediapanel.h b/src/skingui/mediapanel.h index d043955..b90364c 100644 --- a/src/skingui/mediapanel.h +++ b/src/skingui/mediapanel.h @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify @@ -40,13 +40,17 @@ public: QString text() { return mText; } void setText( QString text); + void setScrollingEnabled(bool b); + bool scrollingEnabled() { return scrolling_enabled; }; + private: QString mText; void updateLabel(); int scrollPos; int timerId; QRect textRect; - static const int gap = 10; + static const int gap = 10; + bool scrolling_enabled; protected: void paintEvent(QPaintEvent *); @@ -94,6 +98,7 @@ public: public slots: void setSeeker(int v); void setResolutionVisible(bool b); + void setScrollingEnabled(bool b); private: Ui::MediaPanelClass ui; diff --git a/src/skingui/mybutton.cpp b/src/skingui/mybutton.cpp index c71d0c2..80d9035 100644 --- a/src/skingui/mybutton.cpp +++ b/src/skingui/mybutton.cpp @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify diff --git a/src/skingui/mybutton.h b/src/skingui/mybutton.h index 372dd8d..ce47837 100644 --- a/src/skingui/mybutton.h +++ b/src/skingui/mybutton.h @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify diff --git a/src/skingui/myicon.cpp b/src/skingui/myicon.cpp index 0103845..461eb12 100644 --- a/src/skingui/myicon.cpp +++ b/src/skingui/myicon.cpp @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify diff --git a/src/skingui/myicon.h b/src/skingui/myicon.h index be2f821..64113ae 100644 --- a/src/skingui/myicon.h +++ b/src/skingui/myicon.h @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify diff --git a/src/skingui/panelseeker.cpp b/src/skingui/panelseeker.cpp index b876eb2..05353c1 100644 --- a/src/skingui/panelseeker.cpp +++ b/src/skingui/panelseeker.cpp @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify diff --git a/src/skingui/panelseeker.h b/src/skingui/panelseeker.h index 510bafc..bfdaf1f 100644 --- a/src/skingui/panelseeker.h +++ b/src/skingui/panelseeker.h @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify diff --git a/src/skingui/playcontrol.cpp b/src/skingui/playcontrol.cpp index 238618c..ef712c8 100644 --- a/src/skingui/playcontrol.cpp +++ b/src/skingui/playcontrol.cpp @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify diff --git a/src/skingui/playcontrol.h b/src/skingui/playcontrol.h index 0b6d1cd..bd13b97 100644 --- a/src/skingui/playcontrol.h +++ b/src/skingui/playcontrol.h @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify diff --git a/src/skingui/qpropertysetter.cpp b/src/skingui/qpropertysetter.cpp index 3edf328..3df1578 100644 --- a/src/skingui/qpropertysetter.cpp +++ b/src/skingui/qpropertysetter.cpp @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify diff --git a/src/skingui/qpropertysetter.h b/src/skingui/qpropertysetter.h index 06b3647..adbf594 100644 --- a/src/skingui/qpropertysetter.h +++ b/src/skingui/qpropertysetter.h @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify diff --git a/src/skingui/skingui.cpp b/src/skingui/skingui.cpp index 035f5a3..2ea6947 100644 --- a/src/skingui/skingui.cpp +++ b/src/skingui/skingui.cpp @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -103,7 +103,14 @@ void SkinGui::changeStyleSheet(QString style) { QString qss = Images::styleSheet(); #ifdef USE_RESOURCES Images::setTheme(pref->iconset); - QString path = ":/" + pref->iconset; + QString path; + if (Images::has_rcc) { + path = ":/" + pref->iconset; + } else { + QDir current = QDir::current(); + QString td = Images::themesDirectory(); + path = current.relativeFilePath(td); + } #else QDir current = QDir::current(); QString td = Images::themesDirectory(); @@ -152,6 +159,9 @@ void SkinGui::createActions() { viewVideoInfoAct = new MyAction(this, "toggle_video_info_skingui" ); viewVideoInfoAct->setCheckable(true); + + scrollTitleAct = new MyAction(this, "toggle_scroll_title_skingui" ); + scrollTitleAct->setCheckable(true); } #if AUTODISABLE_ACTIONS @@ -205,6 +215,7 @@ void SkinGui::createMenus() { statusbar_menu = new QMenu(this); statusbar_menu->addAction(viewVideoInfoAct); + statusbar_menu->addAction(scrollTitleAct); optionsMenu->addMenu(statusbar_menu); } @@ -316,6 +327,9 @@ void SkinGui::createControlWidget() { connect( viewVideoInfoAct, SIGNAL(toggled(bool)), mediaBarPanel, SLOT(setResolutionVisible(bool)) ); + connect( scrollTitleAct, SIGNAL(toggled(bool)), + mediaBarPanel, SLOT(setScrollingEnabled(bool)) ); + mediaBarPanelAction = controlwidget->addWidget(mediaBarPanel); } @@ -419,6 +433,7 @@ void SkinGui::retranslateStrings() { #endif viewVideoInfoAct->change(Images::icon("view_video_info"), tr("&Video info") ); + scrollTitleAct->change(Images::icon("scroll_title"), tr("&Scroll title") ); } void SkinGui::displayTime(QString text) { @@ -539,6 +554,7 @@ void SkinGui::saveConfig() { set->beginGroup( "skin_gui"); set->setValue("video_info", viewVideoInfoAct->isChecked()); + set->setValue("scroll_title", scrollTitleAct->isChecked()); set->setValue("fullscreen_toolbar1_was_visible", fullscreen_toolbar1_was_visible); set->setValue("compact_toolbar1_was_visible", compact_toolbar1_was_visible); @@ -574,6 +590,7 @@ void SkinGui::loadConfig() { set->beginGroup( "skin_gui"); viewVideoInfoAct->setChecked(set->value("video_info", false).toBool()); + scrollTitleAct->setChecked(set->value("scroll_title", false).toBool()); fullscreen_toolbar1_was_visible = set->value("fullscreen_toolbar1_was_visible", fullscreen_toolbar1_was_visible).toBool(); compact_toolbar1_was_visible = set->value("compact_toolbar1_was_visible", compact_toolbar1_was_visible).toBool(); diff --git a/src/skingui/skingui.h b/src/skingui/skingui.h index 5aea6cd..f9e7242 100644 --- a/src/skingui/skingui.h +++ b/src/skingui/skingui.h @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -112,6 +112,7 @@ protected: #endif MyAction * viewVideoInfoAct; + MyAction * scrollTitleAct; QMenu * toolbar_menu; QMenu * statusbar_menu; diff --git a/src/skingui/volumecontrolpanel.cpp b/src/skingui/volumecontrolpanel.cpp index e830417..feae4bf 100644 --- a/src/skingui/volumecontrolpanel.cpp +++ b/src/skingui/volumecontrolpanel.cpp @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> + Copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> umplayer, Copyright (C) 2010 Ori Rejwan This program is free software; you can redistribute it and/or modify |