Ignore:
Timestamp:
May 16, 2014, 9:51:55 AM (11 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update trunk to latest 0.8.7

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/skingui/panelseeker.cpp

    r142 r165  
    1 /*  umplayer, GUI front-end for mplayer.
    2     Copyright (C) 2010 Ori Rejwan
     1/*  smplayer, GUI front-end for mplayer.
     2    Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net>
     3    umplayer, Copyright (C) 2010 Ori Rejwan
    34
    45    This program is free software; you can redistribute it and/or modify
     
    8081
    8182void PanelSeeker::setKnobIcon( QPixmap pix )
    82 {   
     83{
    8384    int w = pix.width();
    8485    int h = pix.height();
     
    8889    knobPix.setPixmap(pix.copy(0, 3*h/4, w, h/4 ), MyIcon::Disabled, MyIcon::Off);
    8990    knobCurrentPix = knobPix.pixmap(MyIcon::Normal, MyIcon::Off);
    90     setSliderValue(minimum());
     91    /* setSliderValue(minimum()); */
    9192    setState(Normal, true);
    9293}
    9394
     95/*
    9496void PanelSeeker::setSingleKnobIcon(QPixmap pix)
    9597{
     
    101103    setState(Normal, true);
    102104}
     105*/
    103106
    104107void PanelSeeker::mousePressEvent(QMouseEvent *m)
     
    108111    if(m->button() == Qt::LeftButton)
    109112    {
     113        #if QT_VERSION >= 0x050000
     114        QPointF pos = m->localPos();
     115        #else
    110116        QPointF pos = m->posF();
     117        #endif
    111118        if(knobRect.contains(pos))
    112119        {
     
    120127        {
    121128            isPressed = false;
     129            #if QT_VERSION >= 0x050000
     130            knobAdjust( m->localPos().x() - knobRect.center().x(), true);
     131            #else
    122132            knobAdjust( m->posF().x() - knobRect.center().x(), true);
     133            #endif
    123134        }
    124135    }
     
    130141    if(isPressed)
    131142    {
    132         knobAdjust(m->posF().x() - knobRect.center().x() - mousePressDifference );       
     143        #if QT_VERSION >= 0x050000
     144        knobAdjust(m->localPos().x() - knobRect.center().x() - mousePressDifference );
     145        #else
     146        knobAdjust(m->posF().x() - knobRect.center().x() - mousePressDifference );
     147        #endif
    133148    }
    134149}
Note: See TracChangeset for help on using the changeset viewer.