diff --git a/OpenBoard.pro b/OpenBoard.pro index 4558b666..50ea777a 100644 --- a/OpenBoard.pro +++ b/OpenBoard.pro @@ -10,7 +10,7 @@ CONFIG += debug_and_release \ VERSION_MAJ = 1 VERSION_MIN = 3 -VERSION_PATCH = 0 +VERSION_PATCH = 1 VERSION_TYPE = r # a = alpha, b = beta, rc = release candidate, r = release, other => error VERSION_BUILD = 0 diff --git a/release_scripts/linux/package.sh b/release_scripts/linux/package.sh index 1bdf72db..f64ddec3 100755 --- a/release_scripts/linux/package.sh +++ b/release_scripts/linux/package.sh @@ -199,6 +199,7 @@ if $BUNDLE_QT; then notifyProgress "Copying and stripping Qt plugins" mkdir -p $QT_PLUGINS_DEST_PATH copyQtPlugin audio + copyQtPlugin bearer copyQtPlugin generic copyQtPlugin iconengines copyQtPlugin imageformats @@ -232,6 +233,7 @@ if $BUNDLE_QT; then copyQtLibrary libQt5WebChannel copyQtLibrary libQt5WebKit copyQtLibrary libQt5WebKitWidgets + copyQtLibrary libQt5WebSockets copyQtLibrary libQt5Widgets copyQtLibrary libQt5XcbQpa copyQtLibrary libQt5Xml @@ -353,9 +355,11 @@ echo -n ", onboard" >> "$CONTROL_FILE" if $BUNDLE_QT; then # Listing some dependencies manually; ideally we should use dpkg -p recursively # to get the dependencies of the bundled shared libs & plugins. Or use static libs. - echo -n ", libxcb-render-util0" >> "$CONTROL_FILE" + echo -n ", libxcb1" >> "$CONTROL_FILE" echo -n ", libxcb-icccm4" >> "$CONTROL_FILE" echo -n ", libxcb-xkb1" >> "$CONTROL_FILE" + echo -n ", libxcb-image0" >> "$CONTROL_FILE" + echo -n ", libxcb-render-util0" >> "$CONTROL_FILE" else echo -n ", libqt5multimedia5-plugins" >> "$CONTROL_FILE" fi diff --git a/resources/library/applications/GoogleMap.wgt/index.html b/resources/library/applications/GoogleMap.wgt/index.html index 6f17c525..4a67c99e 100644 --- a/resources/library/applications/GoogleMap.wgt/index.html +++ b/resources/library/applications/GoogleMap.wgt/index.html @@ -1,116 +1,91 @@ - - + + Google Maps - - - - - - -
- + +
+ + diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index b04e5303..6ebe8ee5 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -62,6 +62,7 @@ #include "domain/UBGraphicsTextItem.h" #include "domain/UBPageSizeUndoCommand.h" #include "domain/UBGraphicsGroupContainerItem.h" +#include "domain/UBGraphicsStrokesGroup.h" #include "domain/UBItem.h" #include "board/UBFeaturesController.h" @@ -589,6 +590,10 @@ UBGraphicsItem *UBBoardController::duplicateItem(UBItem *item) itemPos = commonItem->pos() + QPointF(shifting,shifting); itemSize = commonItem->boundingRect().size(); commonItem->setSelected(false); + + UBGraphicsStrokesGroup *stroke = dynamic_cast(commonItem); + if (stroke) + itemPos = QPointF(shifting, shifting); } UBMimeType::Enum itemMimeType; @@ -691,8 +696,7 @@ UBGraphicsItem *UBBoardController::duplicateItem(UBItem *item) { mActiveScene->addItem(gitem); - // Translate the new object a bit - gitem->setPos(20, 20); + gitem->setPos(itemPos); mLastCreatedItem = gitem; gitem->setSelected(true); diff --git a/src/core/UBApplication.cpp b/src/core/UBApplication.cpp index 494feff8..9e08461b 100644 --- a/src/core/UBApplication.cpp +++ b/src/core/UBApplication.cpp @@ -670,3 +670,18 @@ bool UBApplication::isFromWeb(QString url) return res; } + +QScreen* UBApplication::controlScreen() +{ + QList screenList = screens(); + if (screenList.size() == 1) + return screenList.first(); + + return screenList[controlScreenIndex()]; +} + + +int UBApplication::controlScreenIndex() +{ + return applicationController->displayManager()->controleScreenIndex(); +} diff --git a/src/core/UBApplication.h b/src/core/UBApplication.h index ccb8f605..848b96d3 100644 --- a/src/core/UBApplication.h +++ b/src/core/UBApplication.h @@ -100,6 +100,9 @@ class UBApplication : public QtSingleApplication static QString urlFromHtml(QString html); static bool isFromWeb(QString url); + static QScreen* controlScreen(); + static int controlScreenIndex(); + signals: public slots: diff --git a/src/core/UBApplicationController.cpp b/src/core/UBApplicationController.cpp index f1cfa729..daee10dd 100644 --- a/src/core/UBApplicationController.cpp +++ b/src/core/UBApplicationController.cpp @@ -67,7 +67,7 @@ -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC #include #endif @@ -121,12 +121,6 @@ UBApplicationController::UBApplicationController(UBBoardView *pControlView, networkAccessManager = new QNetworkAccessManager (this); QTimer::singleShot (1000, this, SLOT (checkAtLaunch())); - - -#ifdef Q_WS_X11 - mMainWindow->setStyleSheet("QToolButton { font-size: 11px}"); -#endif - } @@ -381,7 +375,7 @@ void UBApplicationController::showBoard() mUninoteController->hideWindow(); - mMainWindow->show(); + UBPlatformUtils::showFullScreen(mMainWindow); emit mainModeChanged(Board); diff --git a/src/core/UBDisplayManager.cpp b/src/core/UBDisplayManager.cpp index 21cb706d..89a80b96 100644 --- a/src/core/UBDisplayManager.cpp +++ b/src/core/UBDisplayManager.cpp @@ -71,7 +71,7 @@ void UBDisplayManager::initScreenIndexes() if (screenCount > 0) { mControlScreenIndex = mDesktop->primaryScreen(); - if (UBSettings::settings()->swapControlAndDisplayScreens->get().toBool()) + if (mDesktop->screenCount() > 1 && UBSettings::settings()->swapControlAndDisplayScreens->get().toBool()) { mControlScreenIndex = mControlScreenIndex^1; } @@ -118,7 +118,7 @@ int UBDisplayManager::numScreens() { if (mUseMultiScreen) { - return mDesktop->numScreens(); + return mDesktop->screenCount(); } else { diff --git a/src/desktop/UBDesktopAnnotationController.cpp b/src/desktop/UBDesktopAnnotationController.cpp index 4f7a0a76..1fb97835 100644 --- a/src/desktop/UBDesktopAnnotationController.cpp +++ b/src/desktop/UBDesktopAnnotationController.cpp @@ -334,7 +334,8 @@ void UBDesktopAnnotationController::showWindow() #ifndef Q_OS_LINUX UBPlatformUtils::showFullScreen(mTransparentDrawingView); #else - // this is necessary to avoid unity to hide the panels + // this is necessary to avoid hiding the panels on Unity and Cinnamon + // if finer control is necessary, use qgetenv("XDG_CURRENT_DESKTOP") mTransparentDrawingView->show(); #endif UBPlatformUtils::setDesktopMode(true); @@ -410,13 +411,7 @@ void UBDesktopAnnotationController::hideWindow() void UBDesktopAnnotationController::goToUniboard() { - onToolClicked(); - hideWindow(); - - UBPlatformUtils::setDesktopMode(false); - UBDrawingController::drawingController()->setInDestopMode(false); - - emit restoreUniboard(); + UBApplication::applicationController->showBoard(); } @@ -431,7 +426,7 @@ void UBDesktopAnnotationController::customCapture() // need to show the window before execute it to avoid some glitch on windows. #ifndef Q_OS_WIN // Working only without this call on win32 desktop mode - customCaptureWindow.show(); + UBPlatformUtils::showFullScreen(&customCaptureWindow); #endif if (customCaptureWindow.execute(getScreenPixmap()) == QDialog::Accepted) @@ -500,7 +495,7 @@ void UBDesktopAnnotationController::screenCapture() QPixmap UBDesktopAnnotationController::getScreenPixmap() { QDesktopWidget *desktop = QApplication::desktop(); - QScreen * screen = QApplication::primaryScreen(); + QScreen * screen = UBApplication::controlScreen(); QRect rect = desktop->screenGeometry(QCursor::pos()); diff --git a/src/domain/UBGraphicsPixmapItem.cpp b/src/domain/UBGraphicsPixmapItem.cpp index a2191321..522a9cb6 100644 --- a/src/domain/UBGraphicsPixmapItem.cpp +++ b/src/domain/UBGraphicsPixmapItem.cpp @@ -120,12 +120,16 @@ void UBGraphicsPixmapItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) void UBGraphicsPixmapItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + painter->setRenderHint(QPainter::Antialiasing, false); + // Never draw the rubber band, we draw our custom selection with the DelegateFrame QStyleOptionGraphicsItem styleOption = QStyleOptionGraphicsItem(*option); styleOption.state &= ~QStyle::State_Selected; QGraphicsPixmapItem::paint(painter, &styleOption, widget); Delegate()->postpaint(painter, option, widget); + + painter->setRenderHint(QPainter::Antialiasing, true); } diff --git a/src/frameworks/UBFileSystemUtils.cpp b/src/frameworks/UBFileSystemUtils.cpp index ec625841..1be67088 100644 --- a/src/frameworks/UBFileSystemUtils.cpp +++ b/src/frameworks/UBFileSystemUtils.cpp @@ -57,7 +57,7 @@ UBFileSystemUtils::~UBFileSystemUtils() QString UBFileSystemUtils::removeLocalFilePrefix(QString input) { -#ifdef Q_WS_WIN +#ifdef Q_OS_WIN if(input.startsWith("file:///")) return input.mid(8); else diff --git a/src/gui/UBScreenMirror.cpp b/src/gui/UBScreenMirror.cpp index a8bc0f37..e9fd0020 100644 --- a/src/gui/UBScreenMirror.cpp +++ b/src/gui/UBScreenMirror.cpp @@ -99,7 +99,7 @@ void UBScreenMirror::grabPixmap() // this is the case we are showing the desktop but the is no widget and we use the last widget rectagle to know // what we have to grab. Not very good way of doing QDesktopWidget * desktop = QApplication::desktop(); - QScreen * screen = QApplication::primaryScreen(); + QScreen * screen = UBApplication::controlScreen(); mLastPixmap = screen->grabWindow(desktop->effectiveWinId(), mRect.x(), mRect.y(), mRect.width(), mRect.height()); } diff --git a/src/podcast/UBPodcastController.cpp b/src/podcast/UBPodcastController.cpp index b588ca96..9ac2fc1d 100644 --- a/src/podcast/UBPodcastController.cpp +++ b/src/podcast/UBPodcastController.cpp @@ -762,8 +762,8 @@ void UBPodcastController::timerEvent(QTimerEvent *event) && mSourceWidget == qApp->desktop()) { QDesktopWidget * dtop = QApplication::desktop(); - QRect dtopRect = dtop->screenGeometry(); - QScreen * screen = QApplication::primaryScreen(); + QRect dtopRect = dtop->screenGeometry(UBApplication::controlScreenIndex()); + QScreen * screen = UBApplication::controlScreen(); QPixmap desktop = screen->grabWindow(dtop->effectiveWinId(), dtopRect.x(), dtopRect.y(), dtopRect.width(), dtopRect.height()); diff --git a/src/web/browser/WBBrowserWindow.cpp b/src/web/browser/WBBrowserWindow.cpp index 8cba1382..520b861e 100644 --- a/src/web/browser/WBBrowserWindow.cpp +++ b/src/web/browser/WBBrowserWindow.cpp @@ -182,7 +182,7 @@ WBHistoryManager *WBBrowserWindow::historyManager() QSize WBBrowserWindow::sizeHint() const { - QRect desktopRect = QApplication::desktop()->screenGeometry(); + QRect desktopRect = QApplication::desktop()->screenGeometry(UBApplication::controlScreenIndex()); QSize size = desktopRect.size() * qreal(0.9); return size; }