Fixed issue 633 again

preferencesAboutTextFull
shibakaneki 12 years ago
parent 986c6eb051
commit d12a2a80e1
  1. 4
      src/board/UBBoardPaletteManager.cpp
  2. 20
      src/desktop/UBDesktopAnnotationController.cpp
  3. 2
      src/gui/UBPropertyPalette.cpp
  4. 2
      src/gui/UBPropertyPalette.h

@ -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)
{

@ -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;
}
}

@ -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);
}
/**

@ -20,6 +20,8 @@
#include "UBActionPalette.h"
#define MAX_HEIGHT 20
class UBPropertyPalette : public UBActionPalette
{
Q_OBJECT

Loading…
Cancel
Save