diff --git a/src/board/UBBoardPaletteManager.cpp b/src/board/UBBoardPaletteManager.cpp index 5c55521c..2652bb15 100644 --- a/src/board/UBBoardPaletteManager.cpp +++ b/src/board/UBBoardPaletteManager.cpp @@ -710,9 +710,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is mLeftPalette->assignParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); mRightPalette->assignParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); mStylusPalette->raise(); - // Maybe threre is a reason to keep that functions but with them right palette in desktop mode is not interactable - // mRightPalette->lower(); - // mLeftPalette->lower(); + if (UBPlatformUtils::hasVirtualKeyboard() && mKeyboardPalette != NULL) { diff --git a/src/desktop/UBDesktopAnnotationController.cpp b/src/desktop/UBDesktopAnnotationController.cpp index 6ca9ba87..e86dca46 100644 --- a/src/desktop/UBDesktopAnnotationController.cpp +++ b/src/desktop/UBDesktopAnnotationController.cpp @@ -86,7 +86,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) mTransparentDrawingView->setScene(mTransparentDrawingScene); mTransparentDrawingScene->setDrawingMode(true); - mDesktopPalette = new UBDesktopPalette(mTransparentDrawingView); + mDesktopPalette = new UBDesktopPalette(NULL); // FIX #633: The palette must be 'floating' in order to stay on top of the library palette if (UBPlatformUtils::hasVirtualKeyboard()) { @@ -119,13 +119,13 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) connect(UBDrawingController::drawingController(), SIGNAL(stylusToolChanged(int)), this, SLOT(stylusToolChanged(int))); // Add the desktop associated palettes - mDesktopPenPalette = new UBDesktopPenPalette(mTransparentDrawingView); + mDesktopPenPalette = new UBDesktopPenPalette(NULL); // FIX #633: The palette must be 'floating' in order to stay on top of the library palette connect(mDesktopPalette, SIGNAL(maximized()), mDesktopPenPalette, SLOT(onParentMaximized())); connect(mDesktopPalette, SIGNAL(minimizeStart(eMinimizedLocation)), mDesktopPenPalette, SLOT(onParentMinimized())); - mDesktopMarkerPalette = new UBDesktopMarkerPalette(mTransparentDrawingView); - mDesktopEraserPalette = new UBDesktopEraserPalette(mTransparentDrawingView); + mDesktopMarkerPalette = new UBDesktopMarkerPalette(NULL); // FIX #633: The palette must be 'floating' in order to stay on top of the library palette + mDesktopEraserPalette = new UBDesktopEraserPalette(NULL); // FIX #633: The palette must be 'floating' in order to stay on top of the library palette mDesktopPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); mDesktopPenPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); @@ -154,6 +154,12 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) connect(UBApplication::boardController->paletteManager()->rightPalette(), SIGNAL(resized()), this, SLOT(refreshMask())); #endif onDesktopPaletteMaximized(); + + // FIX #633: Ensure that these palettes stay on top of the other elements + mDesktopEraserPalette->raise(); + mDesktopMarkerPalette->raise(); + mDesktopPenPalette->raise(); + mDesktopPalette->raise(); } UBDesktopAnnotationController::~UBDesktopAnnotationController() @@ -243,11 +249,7 @@ void UBDesktopAnnotationController::setAssociatedPalettePosition(UBActionPalette if(act->objectName() == actionName) { int iAction = actions.indexOf(act); - yPen = iAction * mDesktopPalette->buttonSize().height(); - - // Add the borders - yPen += (iAction) * (mDesktopPalette->border() + 4); // 4 has been set after some experiment. We must determine why this value is good - + yPen = iAction * (mDesktopPalette->buttonSize().height() + 2 * mDesktopPalette->border() +6); // This is the mysterious value (6) break; } } diff --git a/src/gui/UBPropertyPalette.cpp b/src/gui/UBPropertyPalette.cpp index 8d587c99..643f87a7 100644 --- a/src/gui/UBPropertyPalette.cpp +++ b/src/gui/UBPropertyPalette.cpp @@ -25,6 +25,7 @@ UBPropertyPalette::UBPropertyPalette(QWidget *parent, const char *name):UBAction { setObjectName(name); mbGrip = false; + setMaximumHeight(MAX_HEIGHT); } /** @@ -35,6 +36,7 @@ UBPropertyPalette::UBPropertyPalette(QWidget *parent, const char *name):UBAction UBPropertyPalette::UBPropertyPalette(Qt::Orientation orientation, QWidget *parent):UBActionPalette(orientation, parent) { mbGrip = false; + setMaximumHeight(MAX_HEIGHT); } /** diff --git a/src/gui/UBPropertyPalette.h b/src/gui/UBPropertyPalette.h index 777e976e..47bacf13 100644 --- a/src/gui/UBPropertyPalette.h +++ b/src/gui/UBPropertyPalette.h @@ -20,6 +20,8 @@ #include "UBActionPalette.h" +#define MAX_HEIGHT 20 + class UBPropertyPalette : public UBActionPalette { Q_OBJECT