Fixed linux issues

preferencesAboutTextFull
Anatoly Mihalchenko 13 years ago
parent 7f82e82b3b
commit 076e074e0b
  1. 5
      src/adaptors/UBThumbnailAdaptor.cpp
  2. 15
      src/gui/UBDocumentNavigator.cpp
  3. 1
      src/gui/UBDocumentNavigator.h

@ -78,18 +78,17 @@ const QPixmap* UBThumbnailAdaptor::get(UBDocumentProxy* proxy, int pageIndex)
generateMissingThumbnails(proxy);
}
QPixmap* pix = new QPixmap();
if (file.exists())
{
QPixmap* pix = new QPixmap();
//Warning. Works only with modified Qt
#ifdef Q_WS_X11
pix->load(fileName, 0, Qt::AutoColor);
#else
pix->load(fileName, 0, Qt::AutoColor, false);
#endif
return pix;
}
return NULL;
return pix;
}
void UBThumbnailAdaptor::load(UBDocumentProxy* proxy, QList<const QPixmap*>& list)

@ -94,12 +94,6 @@ void UBDocumentNavigator::generateThumbnails(UBDocumentContainer* source)
mScene->addItem(pixmapItem);
mScene->addItem(labelItem);
// Get the selected item
if(UBApplication::boardController->activeSceneIndex() == i)
{
pixmapItem->setSelected(true);
}
}
// Draw the items
@ -108,13 +102,13 @@ void UBDocumentNavigator::generateThumbnails(UBDocumentContainer* source)
void UBDocumentNavigator::onScrollToSelectedPage(int index)
{
qDebug() << "Selection in widet: " << index;
int c = 0;
foreach(UBImgTextThumbnailElement el, mThumbsWithLabels)
{
if (c==index)
{
el.getThumbnail()->setSelected(true);
centerOn(el.getThumbnail());
}
else
{
@ -122,7 +116,7 @@ void UBDocumentNavigator::onScrollToSelectedPage(int index)
}
c++;
}
refreshScene();
centerOn(mThumbsWithLabels[index].getThumbnail());
}
/**
@ -267,8 +261,13 @@ void UBDocumentNavigator::mousePressEvent(QMouseEvent *event)
break;
}
}
qDebug() << "Selected Scene: " << index;
UBApplication::boardController->setActiveDocumentScene(index);
}
QGraphicsView::mousePressEvent(event);
}
void UBDocumentNavigator::mouseReleaseEvent(QMouseEvent *event)
{
event->accept();
}

@ -47,6 +47,7 @@ public slots:
protected:
virtual void resizeEvent(QResizeEvent *event);
virtual void mousePressEvent(QMouseEvent *event);
virtual void mouseReleaseEvent(QMouseEvent *event);
private:

Loading…
Cancel
Save