diff --git a/Sankore 3.1.iss b/Sankore 3.1.iss index 3feaa618..759c3b51 100644 --- a/Sankore 3.1.iss +++ b/Sankore 3.1.iss @@ -91,6 +91,10 @@ Source: "c:\OpenSankore\plugins\mediaservice\qtmedia_audioengined.dll"; DestDir: Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3u.dll"; DestDir: "c:\OpenSankore\plugins\playlistformats"; Flags: ignoreversion Source: "c:\OpenSankore\plugins\playlistformats\qtmultimediakit_m3ud.dll"; DestDir: "c:\OpenSankore\plugins\playlistformats"; Flags: ignoreversion +;fonts for xpdf +Source: "resources\windows\xpdfrc"; DestDir: "{app}"; Flags: ignoreversion +Source: "resources\fonts\*"; DestDir: "{app}\fonts"; Flags: ignoreversion + [Icons] Name: "{group}\Open-Sankoré"; Filename: "{app}\Open-Sankore.exe" Name: "{group}\{cm:UninstallProgram,Open-Sankoré}"; Filename: "{uninstallexe}" diff --git a/resources/etc/Uniboard.css b/resources/etc/Uniboard.css index bd5cbbcf..9ae3cf38 100644 --- a/resources/etc/Uniboard.css +++ b/resources/etc/Uniboard.css @@ -1,6 +1,11 @@ -* +QWidget:enabled { color: #3F3F3F; +} + +QWidget:disabled +{ + color: #AAAAAA; } QTextEdit, diff --git a/resources/windows/xpdfrc b/resources/windows/xpdfrc new file mode 100644 index 00000000..3762132c --- /dev/null +++ b/resources/windows/xpdfrc @@ -0,0 +1,14 @@ +fontFile Times-Roman fonts/n021003l.pfb +fontFile Times-Italic fonts/n021023l.pfb +fontFile Times-Bold fonts/n021004l.pfb +fontFile Times-BoldItalic fonts/n021024l.pfb +fontFile Helvetica fonts/n019003l.pfb +fontFile Helvetica-Oblique fonts/n019023l.pfb +fontFile Helvetica-Bold fonts/n019004l.pfb +fontFile Helvetica-BoldOblique fonts/n019024l.pfb +fontFile Courier fonts/n022003l.pfb +fontFile Courier-Oblique fonts/n022023l.pfb +fontFile Courier-Bold fonts/n022004l.pfb +fontFile Courier-BoldOblique fonts/n022024l.pfb +fontFile Symbol fonts/s050000l.pfb +fontFile ZapfDingbats fonts/d050000l.pfb \ No newline at end of file diff --git a/src/adaptors/UBSvgSubsetAdaptor.cpp b/src/adaptors/UBSvgSubsetAdaptor.cpp index 8392dc68..544a2128 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.cpp +++ b/src/adaptors/UBSvgSubsetAdaptor.cpp @@ -1693,6 +1693,7 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::polygonItemToSvgPolygon(UBGraphicsPo QString points = pointsToSvgPointsAttribute(polygon); mXmlWriter.writeAttribute("points", points); + mXmlWriter.writeAttribute("transform",toSvgTransform(polygonItem->sceneMatrix())); mXmlWriter.writeAttribute("fill", polygonItem->brush().color().name()); qreal alpha = polygonItem->brush().color().alphaF(); @@ -1781,6 +1782,16 @@ UBGraphicsPolygonItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::polygonItemFromPol polygonItem->setPolygon(polygon); + QStringRef svgTransform = mXmlReader.attributes().value("transform"); + + QMatrix itemMatrix; + + if (!svgTransform.isNull()) + { + itemMatrix = fromSvgTransform(svgTransform.toString()); + polygonItem->setMatrix(itemMatrix); + } + QStringRef svgFill = mXmlReader.attributes().value("fill"); QColor brushColor = pDefaultColor; diff --git a/src/core/UBApplication.cpp b/src/core/UBApplication.cpp index f673cc35..8ae3d589 100644 --- a/src/core/UBApplication.cpp +++ b/src/core/UBApplication.cpp @@ -55,6 +55,7 @@ #include "frameworks/UBCryptoUtils.h" #include "tools/UBToolsManager.h" +#include "UBDisplayManager.h" #include "core/memcheck.h" QPointer UBApplication::undoStack; @@ -378,9 +379,18 @@ int UBApplication::exec(const QString& pFileToImport) else applicationController->showBoard(); + onScreenCountChanged(1); + connect(desktop(), SIGNAL(screenCountChanged(int)), this, SLOT(onScreenCountChanged(int))); return QApplication::exec(); } +void UBApplication::onScreenCountChanged(int newCount) +{ + Q_UNUSED(newCount); + UBDisplayManager displayManager; + mainWindow->actionMultiScreen->setEnabled(displayManager.numScreens() > 1); +} + void UBApplication::importUniboardFiles() { mUniboardSankoreTransition = new UniboardSankoreTransition(); diff --git a/src/core/UBApplication.h b/src/core/UBApplication.h index b08fdcee..9726cd52 100644 --- a/src/core/UBApplication.h +++ b/src/core/UBApplication.h @@ -117,6 +117,8 @@ class UBApplication : public QtSingleApplication #endif void importUniboardFiles(); + void onScreenCountChanged(int newCount); + private: void updateProtoActionsState(); void setupTranslators(QStringList args); diff --git a/src/core/UBPreferencesController.cpp b/src/core/UBPreferencesController.cpp index 64fb3b20..8bfede9f 100644 --- a/src/core/UBPreferencesController.cpp +++ b/src/core/UBPreferencesController.cpp @@ -64,9 +64,12 @@ UBPreferencesController::UBPreferencesController(QWidget *parent) , mPenProperties(0) , mMarkerProperties(0) { + mDesktop = qApp->desktop(); mPreferencesWindow = new UBPreferencesDialog(this,parent, Qt::Dialog); mPreferencesUI = new Ui::preferencesDialog(); // deleted in mPreferencesUI->setupUi(mPreferencesWindow); + adjustScreens(1); + connect(mDesktop, SIGNAL(screenCountChanged(int)), this, SLOT(adjustScreens(int))); wire(); } @@ -83,6 +86,12 @@ UBPreferencesController::~UBPreferencesController() delete mMarkerProperties; } +void UBPreferencesController::adjustScreens(int screen) +{ + Q_UNUSED(screen); + UBDisplayManager displayManager; + mPreferencesUI->multiDisplayGroupBox->setEnabled(displayManager.numScreens() > 1); +} void UBPreferencesController::show() { diff --git a/src/core/UBPreferencesController.h b/src/core/UBPreferencesController.h index 7ce7e0e9..74529392 100644 --- a/src/core/UBPreferencesController.h +++ b/src/core/UBPreferencesController.h @@ -85,12 +85,15 @@ class UBPreferencesController : public QObject void onCommunityPasswordChanged(); void onCommunityPersistenceChanged(); - private: + private slots: + void adjustScreens(int screen); + private: static qreal sSliderRatio; static qreal sMinPenWidth; static qreal sMaxPenWidth; void persistanceCheckboxUpdate(); + QDesktopWidget* mDesktop; }; diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index 064d9b28..31dc0b96 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -287,6 +287,7 @@ UBGraphicsScene::UBGraphicsScene(UBDocumentProxy* parent, bool enableUndoRedoSta mShouldUseOMP = QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5; #endif + setUuid(QUuid::createUuid()); setDocument(parent); createEraiser(); createPointer();