Ignore:
Timestamp:
May 15, 2014, 7:53:54 PM (12 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update vendor to 0.8.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • smplayer/vendor/current/src/mpcgui/mpcgui.cpp

    r154 r163  
    2020#include "mpcstyles.h"
    2121#include "widgetactions.h"
    22 #include "floatingwidget.h"
     22#include "widget.h"
    2323#include "myaction.h"
    2424#include "mplayerwindow.h"
     
    3232#include <QLabel>
    3333#include <QSlider>
     34
    3435#include <QApplication>
    3536
     
    4243        createActions();
    4344        createControlWidget();
    44     createStatusBar();
    45 
    46         connect( this, SIGNAL(cursorNearBottom(QPoint)),
    47              this, SLOT(showFloatingControl(QPoint)) );
    48 
    49         connect( this, SIGNAL(cursorFarEdges()),
    50              this, SLOT(hideFloatingControl()) );
     45        createStatusBar();
     46        createFloatingControl();
    5147
    5248        retranslateStrings();
     
    9389        controlwidget->setAllowedAreas(Qt::BottomToolBarArea);
    9490        controlwidget->addAction(playAct);
    95     controlwidget->addAction(pauseAct);
     91controlwidget->addAction(pauseAct);
    9692        controlwidget->addAction(stopAct);
    9793        controlwidget->addSeparator();
    98     controlwidget->addAction(rewind3Act);
    99     controlwidget->addAction(rewind1Act);
    100     controlwidget->addAction(forward1Act);
    101     controlwidget->addAction(forward3Act);
    102     controlwidget->addSeparator();
    103     controlwidget->addAction(frameStepAct);
    104     controlwidget->addSeparator();
    105 
    106     QLabel* pLabel = new QLabel(this);
    107     pLabel->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
    108     controlwidget->addWidget(pLabel);
     94controlwidget->addAction(rewind3Act);
     95controlwidget->addAction(rewind1Act);
     96controlwidget->addAction(forward1Act);
     97controlwidget->addAction(forward3Act);
     98controlwidget->addSeparator();
     99controlwidget->addAction(frameStepAct);
     100controlwidget->addSeparator();
     101
     102QLabel* pLabel = new QLabel(this);
     103pLabel->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
     104controlwidget->addWidget(pLabel);
    109105
    110106        controlwidget->addAction(muteAct);
     
    115111        timeslidewidget->setLayoutDirection(Qt::LeftToRight);
    116112        timeslidewidget->addAction(timeslider_action);
    117     timeslidewidget->setMovable(false);
    118    
    119     QColor SliderColor = palette().color(QPalette::Window);
    120     QColor SliderBorderColor = palette().color(QPalette::Dark);
    121     setIconSize( QSize( 16 , 16 ) );
    122 
    123     addToolBar(Qt::BottomToolBarArea, controlwidget);
    124     addToolBarBreak(Qt::BottomToolBarArea);
     113        timeslidewidget->setMovable(false);
     114
     115        /*
     116        QColor SliderColor = palette().color(QPalette::Window);
     117        QColor SliderBorderColor = palette().color(QPalette::Dark);
     118        */
     119        setIconSize( QSize( 16 , 16 ) );
     120
     121        addToolBar(Qt::BottomToolBarArea, controlwidget);
     122        addToolBarBreak(Qt::BottomToolBarArea);
    125123        addToolBar(Qt::BottomToolBarArea, timeslidewidget);
    126124
    127     controlwidget->setStyle(new  MpcToolbarStyle() );
    128     timeslidewidget->setStyle(new  MpcToolbarStyle() );
    129 
    130     statusBar()->show();
     125        controlwidget->setStyle(new MpcToolbarStyle() );
     126        timeslidewidget->setStyle(new MpcToolbarStyle() );
     127
     128        statusBar()->show();
     129}
     130
     131void MpcGui::createFloatingControl() {
     132        // Floating control
     133        floating_control = new AutohideWidget(panel);
     134        floating_control->setAutoHide(true);
     135        floating_control->hide();
     136        spacer = new QSpacerItem(10,10);
    131137}
    132138
     
    163169        BaseGuiPlus::aboutToEnterFullscreen();
    164170
     171
     172
     173
     174
     175
     176
     177
     178
     179
     180
     181
     182
     183
     184
     185
     186
     187
     188
     189
     190
    165191        if (!pref->compact_mode) {
    166                 controlwidget->hide();
    167         timeslidewidget->hide();
    168         statusBar()->hide();
     192                controlwidget->hide();
     193timeslidewidget->hide();
     194statusBar()->hide();
    169195        }
    170196}
     
    173199        BaseGuiPlus::aboutToExitFullscreen();
    174200
     201
     202
     203
     204
     205
     206
     207
     208
     209
    175210        if (!pref->compact_mode) {
    176211                controlwidget->show();
    177         statusBar()->show();
    178         timeslidewidget->show();
     212                statusBar()->show();
     213                timeslidewidget->show();
     214        } else {
     215                controlwidget->hide();
     216                timeslidewidget->hide();
    179217        }
    180218}
     
    184222
    185223        controlwidget->hide();
    186     timeslidewidget->hide();
    187     statusBar()->hide();
     224timeslidewidget->hide();
     225statusBar()->hide();
    188226}
    189227
     
    193231        statusBar()->show();
    194232        controlwidget->show();
    195     timeslidewidget->show();
    196 }
    197 
    198 void MpcGui::showFloatingControl(QPoint /*p*/) {
    199 }
    200 
    201 void MpcGui::hideFloatingControl() {
     233        timeslidewidget->show();
    202234}
    203235
     
    381413        connect( this, SIGNAL(frameChanged(int)),
    382414             this, SLOT(displayFrame(int)) );
    383 
    384     connect( this, SIGNAL(cursorNearBottom(QPoint)),
    385              this, SLOT(showFullscreenControls()) );
    386 
    387     connect( this, SIGNAL(cursorFarEdges()),
    388              this, SLOT(hideFullscreenControls()) );
    389415}
    390416
Note: See TracChangeset for help on using the changeset viewer.