committed by
Craig Drummond
parent
8ecda06a18
commit
69f687c162
@@ -279,20 +279,9 @@ ContextWidget::ContextWidget(QWidget *parent)
|
||||
connect(artist, SIGNAL(findAlbum(QString,QString)), this, SIGNAL(findAlbum(QString,QString)));
|
||||
connect(album, SIGNAL(playSong(QString)), this, SIGNAL(playSong(QString)));
|
||||
readConfig();
|
||||
setZoom();
|
||||
setWide(true);
|
||||
}
|
||||
|
||||
void ContextWidget::setZoom()
|
||||
{
|
||||
int zoom=Settings::self()->contextZoom();
|
||||
if (zoom) {
|
||||
artist->setZoom(zoom);
|
||||
album->setZoom(zoom);
|
||||
song->setZoom(zoom);
|
||||
}
|
||||
}
|
||||
|
||||
void ContextWidget::setWide(bool w)
|
||||
{
|
||||
if (w==isWide) {
|
||||
@@ -440,7 +429,6 @@ void ContextWidget::readConfig()
|
||||
|
||||
void ContextWidget::saveConfig()
|
||||
{
|
||||
Settings::self()->saveContextZoom(artist->getZoom());
|
||||
if (viewSelector) {
|
||||
Settings::self()->saveContextSlimPage(viewSelector->itemData(viewSelector->currentIndex()).toString());
|
||||
}
|
||||
@@ -662,22 +650,6 @@ void ContextWidget::update(const Song &s)
|
||||
}
|
||||
}
|
||||
|
||||
bool ContextWidget::eventFilter(QObject *o, QEvent *e)
|
||||
{
|
||||
if (QEvent::Wheel==e->type()) {
|
||||
QWheelEvent *we=static_cast<QWheelEvent *>(e);
|
||||
if (Qt::ControlModifier==we->modifiers()) {
|
||||
int numDegrees = static_cast<QWheelEvent *>(e)->delta() / 8;
|
||||
int numSteps = numDegrees / 15;
|
||||
artist->setZoom(numSteps);
|
||||
album->setZoom(numSteps);
|
||||
song->setZoom(numSteps);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return QObject::eventFilter(o, e);
|
||||
}
|
||||
|
||||
void ContextWidget::cancel()
|
||||
{
|
||||
if (job) {
|
||||
|
||||
Reference in New Issue
Block a user