Merge remote-tracking branch 'origin/develop' into claudio-dev

preferencesAboutTextFull
Claudio Valerio 12 years ago
commit a83c916888
  1. 4
      resources/library/applications/Grapheur.wgt/Grapheur.xhtml
  2. 29
      resources/library/interactivities/Contraste.wgt/locales/fr/scripts/blackYellow.js
  3. 29
      resources/library/interactivities/Contraste.wgt/locales/ru/scripts/blackYellow.js
  4. 29
      resources/library/interactivities/Contraste.wgt/scripts/blackYellow.js
  5. 1
      resources/library/interactivities/Ordre phrase.wgt/styles/of_puppets.css
  6. 4
      src/board/UBBoardPaletteManager.cpp
  7. 4
      src/board/UBBoardView.cpp
  8. 1
      src/board/UBBoardView.h
  9. 47
      src/board/UBFeaturesController.cpp
  10. 8
      src/board/UBFeaturesController.h
  11. 20
      src/desktop/UBDesktopAnnotationController.cpp
  12. 2
      src/gui/UBFeaturesWidget.cpp
  13. 2
      src/gui/UBPropertyPalette.cpp
  14. 2
      src/gui/UBPropertyPalette.h
  15. 4
      src/gui/UBThumbnailWidget.cpp

@ -218,7 +218,6 @@
return true; return true;
}); });
$("label[for*='checkAire']").text(sankoreLang[lang].draw); $("label[for*='checkAire']").text(sankoreLang[lang].draw);
$("label[for*='checkMaJ']").text(sankoreLang[lang].auto_update);
$("#menuOptions td").eq(0).html(sankoreLang[lang].widget); $("#menuOptions td").eq(0).html(sankoreLang[lang].widget);
$("#menuOptions h3").eq(0).text(sankoreLang[lang].widget_options); $("#menuOptions h3").eq(0).text(sankoreLang[lang].widget_options);
$("#menuOptions2D h3").eq(0).text(sankoreLang[lang].options + " 2D"); $("#menuOptions2D h3").eq(0).text(sankoreLang[lang].options + " 2D");
@ -1033,13 +1032,10 @@
<span class="gras">Control options:</span><br/> <span class="gras">Control options:</span><br/>
<input type="button" class="boutonSauvegarde" onclick="saveOptions()" value="Save"/><input type="button" class="boutonSauvegarde" onclick="loadOptions()" value="Load"/> <input class="boutonSauvegarde2" type="button" onclick="delOptions()" value="Delete"/><input class="boutonSauvegarde2" type="button" onclick="alertOptions()" value="Display"/><br/> <input type="button" class="boutonSauvegarde" onclick="saveOptions()" value="Save"/><input type="button" class="boutonSauvegarde" onclick="loadOptions()" value="Load"/> <input class="boutonSauvegarde2" type="button" onclick="delOptions()" value="Delete"/><input class="boutonSauvegarde2" type="button" onclick="alertOptions()" value="Display"/><br/>
<span class="texteSecondaire">Save a widget options in cookies or load an options from cookies or delete a registered options.</span> <span class="texteSecondaire">Save a widget options in cookies or load an options from cookies or delete a registered options.</span>
<br/><br/>
<label for="checkMaJ">Automatically update when a widget opening.</label> <input type="checkbox" id="checkMaJ" onclick="checkboxMaJ()"/>
<br/> <br/>
<div id="cacheCookies"><br/><br/><h1>Cookies are disabled. You cannot save an options...</h1></div> <div id="cacheCookies"><br/><br/><h1>Cookies are disabled. You cannot save an options...</h1></div>
<div id="cacheMaJ">You are using the last version of this widget.</div> <div id="cacheMaJ">You are using the last version of this widget.</div>
<input type="button" onclick='reset()' value="Reload widget" style="position:absolute; bottom:20px; width:140px; height:32px;"/> <input type="button" onclick='reset()' value="Reload widget" style="position:absolute; bottom:20px; width:140px; height:32px;"/>
<input type="button" onclick='miseAjour()' value="Updated" style="position:absolute; bottom:20px; left:160px; width:140px; height:32px;"/>
</div> </div>
<div class="barreBasMenu"><input type="button" onclick="cacherMenu(); actualiserGraph()" value="Check"/></div> <div class="barreBasMenu"><input type="button" onclick="cacherMenu(); actualiserGraph()" value="Check"/></div>
</div> </div>

@ -326,6 +326,15 @@ function init(){
$(".closeItem").live("click", function(){ $(".closeItem").live("click", function(){
if(!shadowOver){ if(!shadowOver){
$(this).parent().remove(); $(this).parent().remove();
if($(".editContainer").size() > 0){
var prev = $(".editContainer:first");
if((prev.position().left == 54) && (prev.position().top != 60))
prev.css("top", "60px");
var prevBottom = prev.position().top + prev.height(),
prevLeft = prev.position().left;
if(prev.next().length)
recursionCall(prevBottom, prevLeft, prev.next());
}
} }
}); });
@ -339,8 +348,7 @@ function init(){
}) })
function recursionCall(prevBottom, prevLeft, curr){ function recursionCall(prevBottom, prevLeft, curr){
var curTop = curr.position().top, var curHeight = curr.height(),
curHeight = curr.height(),
curLeft = curr.position().left; curLeft = curr.position().left;
if(prevLeft == curLeft){ if(prevLeft == curLeft){
if((prevBottom + 15 + curHeight) < ($(window).height() - 54)) if((prevBottom + 15 + curHeight) < ($(window).height() - 54))
@ -351,7 +359,7 @@ function init(){
if((prevBottom + 15 + curHeight) < ($(window).height() - 54)) if((prevBottom + 15 + curHeight) < ($(window).height() - 54))
curr.css("top", prevBottom + 15 + "px").css("left", prevLeft + "px"); curr.css("top", prevBottom + 15 + "px").css("left", prevLeft + "px");
else else
curr.css("top", "60px"); curr.css("top", "60px").css("left", prevLeft + 255 + "px");
} }
prevBottom = curr.position().top + curr.height(), prevBottom = curr.position().top + curr.height(),
prevLeft = curr.position().left; prevLeft = curr.position().left;
@ -364,7 +372,20 @@ function init(){
popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%"); popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
$(window).resize(function(){ $(window).resize(function(){
//$("#leftDiv,#rightDiv,#shadowDiv").css("height", $(window).height()); if($("#wgt_edit").hasClass("selected")){
if($(".editContainer").size() > 1){
var prev = $(".editContainer:first"),
prevBottom = prev.position().top + prev.height(),
prevLeft = prev.position().left;
recursionCall(prevBottom, prevLeft, prev.next());
}
} else {
var tmp_array = [];
$(".readyTask").each(function(){
tmp_array.push($(this));
});
orderItems(tmp_array);
}
popupBack.css("top", ($(window).height() - 138)*50/$(window).height() + "%"); popupBack.css("top", ($(window).height() - 138)*50/$(window).height() + "%");
popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%"); popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
}); });

@ -326,6 +326,15 @@ function init(){
$(".closeItem").live("click", function(){ $(".closeItem").live("click", function(){
if(!shadowOver){ if(!shadowOver){
$(this).parent().remove(); $(this).parent().remove();
if($(".editContainer").size() > 0){
var prev = $(".editContainer:first");
if((prev.position().left == 54) && (prev.position().top != 60))
prev.css("top", "60px");
var prevBottom = prev.position().top + prev.height(),
prevLeft = prev.position().left;
if(prev.next().length)
recursionCall(prevBottom, prevLeft, prev.next());
}
} }
}); });
@ -339,8 +348,7 @@ function init(){
}) })
function recursionCall(prevBottom, prevLeft, curr){ function recursionCall(prevBottom, prevLeft, curr){
var curTop = curr.position().top, var curHeight = curr.height(),
curHeight = curr.height(),
curLeft = curr.position().left; curLeft = curr.position().left;
if(prevLeft == curLeft){ if(prevLeft == curLeft){
if((prevBottom + 15 + curHeight) < ($(window).height() - 54)) if((prevBottom + 15 + curHeight) < ($(window).height() - 54))
@ -351,7 +359,7 @@ function init(){
if((prevBottom + 15 + curHeight) < ($(window).height() - 54)) if((prevBottom + 15 + curHeight) < ($(window).height() - 54))
curr.css("top", prevBottom + 15 + "px").css("left", prevLeft + "px"); curr.css("top", prevBottom + 15 + "px").css("left", prevLeft + "px");
else else
curr.css("top", "60px"); curr.css("top", "60px").css("left", prevLeft + 255 + "px");
} }
prevBottom = curr.position().top + curr.height(), prevBottom = curr.position().top + curr.height(),
prevLeft = curr.position().left; prevLeft = curr.position().left;
@ -364,7 +372,20 @@ function init(){
popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%"); popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
$(window).resize(function(){ $(window).resize(function(){
//$("#leftDiv,#rightDiv,#shadowDiv").css("height", $(window).height()); if($("#wgt_edit").hasClass("selected")){
if($(".editContainer").size() > 1){
var prev = $(".editContainer:first"),
prevBottom = prev.position().top + prev.height(),
prevLeft = prev.position().left;
recursionCall(prevBottom, prevLeft, prev.next());
}
} else {
var tmp_array = [];
$(".readyTask").each(function(){
tmp_array.push($(this));
});
orderItems(tmp_array);
}
popupBack.css("top", ($(window).height() - 138)*50/$(window).height() + "%"); popupBack.css("top", ($(window).height() - 138)*50/$(window).height() + "%");
popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%"); popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
}); });

@ -326,6 +326,15 @@ function init(){
$(".closeItem").live("click", function(){ $(".closeItem").live("click", function(){
if(!shadowOver){ if(!shadowOver){
$(this).parent().remove(); $(this).parent().remove();
if($(".editContainer").size() > 0){
var prev = $(".editContainer:first");
if((prev.position().left == 54) && (prev.position().top != 60))
prev.css("top", "60px");
var prevBottom = prev.position().top + prev.height(),
prevLeft = prev.position().left;
if(prev.next().length)
recursionCall(prevBottom, prevLeft, prev.next());
}
} }
}); });
@ -339,8 +348,7 @@ function init(){
}) })
function recursionCall(prevBottom, prevLeft, curr){ function recursionCall(prevBottom, prevLeft, curr){
var curTop = curr.position().top, var curHeight = curr.height(),
curHeight = curr.height(),
curLeft = curr.position().left; curLeft = curr.position().left;
if(prevLeft == curLeft){ if(prevLeft == curLeft){
if((prevBottom + 15 + curHeight) < ($(window).height() - 54)) if((prevBottom + 15 + curHeight) < ($(window).height() - 54))
@ -351,7 +359,7 @@ function init(){
if((prevBottom + 15 + curHeight) < ($(window).height() - 54)) if((prevBottom + 15 + curHeight) < ($(window).height() - 54))
curr.css("top", prevBottom + 15 + "px").css("left", prevLeft + "px"); curr.css("top", prevBottom + 15 + "px").css("left", prevLeft + "px");
else else
curr.css("top", "60px"); curr.css("top", "60px").css("left", prevLeft + 255 + "px");
} }
prevBottom = curr.position().top + curr.height(), prevBottom = curr.position().top + curr.height(),
prevLeft = curr.position().left; prevLeft = curr.position().left;
@ -364,7 +372,20 @@ function init(){
popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%"); popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
$(window).resize(function(){ $(window).resize(function(){
//$("#leftDiv,#rightDiv,#shadowDiv").css("height", $(window).height()); if($("#wgt_edit").hasClass("selected")){
if($(".editContainer").size() > 1){
var prev = $(".editContainer:first"),
prevBottom = prev.position().top + prev.height(),
prevLeft = prev.position().left;
recursionCall(prevBottom, prevLeft, prev.next());
}
} else {
var tmp_array = [];
$(".readyTask").each(function(){
tmp_array.push($(this));
});
orderItems(tmp_array);
}
popupBack.css("top", ($(window).height() - 138)*50/$(window).height() + "%"); popupBack.css("top", ($(window).height() - 138)*50/$(window).height() + "%");
popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%"); popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
}); });

@ -33,7 +33,6 @@ body{
font: 28px tahoma; font: 28px tahoma;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
text-transform: uppercase;
overflow: hidden; overflow: hidden;
} }

@ -710,9 +710,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
mLeftPalette->assignParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); mLeftPalette->assignParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView());
mRightPalette->assignParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); mRightPalette->assignParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView());
mStylusPalette->raise(); 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) if (UBPlatformUtils::hasVirtualKeyboard() && mKeyboardPalette != NULL)
{ {

@ -75,6 +75,7 @@ UBBoardView::UBBoardView (UBBoardController* pController, QWidget* pParent, bool
, mIsDragInProgress(false) , mIsDragInProgress(false)
, mMultipleSelectionIsEnabled(false) , mMultipleSelectionIsEnabled(false)
, isControl(pIsControl) , isControl(pIsControl)
, mRubberBandInPlayMode(false) //enables rubberband with play tool
{ {
init (); init ();
@ -1020,6 +1021,8 @@ UBBoardView::mouseMoveEvent (QMouseEvent *event)
return; return;
} }
if (currentTool != UBStylusTool::Play || mRubberBandInPlayMode) {
if (!movingItem && (mMouseButtonIsPressed || mTabletStylusIsPressed) && mUBRubberBand && mUBRubberBand->isVisible()) { if (!movingItem && (mMouseButtonIsPressed || mTabletStylusIsPressed) && mUBRubberBand && mUBRubberBand->isVisible()) {
QRect bandRect(mMouseDownPos, event->pos()); QRect bandRect(mMouseDownPos, event->pos());
@ -1054,6 +1057,7 @@ UBBoardView::mouseMoveEvent (QMouseEvent *event)
} }
} }
} }
}
handleItemMouseMove(event); handleItemMouseMove(event);
} }

@ -154,6 +154,7 @@ class UBBoardView : public QGraphicsView
bool mIsDragInProgress; bool mIsDragInProgress;
bool mMultipleSelectionIsEnabled; bool mMultipleSelectionIsEnabled;
bool isControl; bool isControl;
bool mRubberBandInPlayMode;
static bool hasSelectedParents(QGraphicsItem * item); static bool hasSelectedParents(QGraphicsItem * item);

@ -36,7 +36,6 @@ const QString UBFeaturesController::webSearchPath = rootPath + "/Web search";
void UBFeaturesComputingThread::scanFS(const QUrl & currentPath, const QString & currVirtualPath, const QSet<QUrl> &pFavoriteSet) void UBFeaturesComputingThread::scanFS(const QUrl & currentPath, const QString & currVirtualPath, const QSet<QUrl> &pFavoriteSet)
{ {
Q_ASSERT(QFileInfo(currentPath.toLocalFile()).exists()); Q_ASSERT(QFileInfo(currentPath.toLocalFile()).exists());
QFileInfoList fileInfoList = UBFileSystemUtils::allElementsInDirectory(currentPath.toLocalFile()); QFileInfoList fileInfoList = UBFileSystemUtils::allElementsInDirectory(currentPath.toLocalFile());
@ -73,16 +72,16 @@ void UBFeaturesComputingThread::scanFS(const QUrl & currentPath, const QString &
} }
} }
void UBFeaturesComputingThread::scanAll(QList<QPair<QUrl, QString> > pScanningData, const QSet<QUrl> &pFavoriteSet) void UBFeaturesComputingThread::scanAll(QList<QPair<QUrl, UBFeature> > pScanningData, const QSet<QUrl> &pFavoriteSet)
{ {
for (int i = 0; i < pScanningData.count(); i++) { for (int i = 0; i < pScanningData.count(); i++) {
if (abort) { if (abort) {
return; return;
} }
QPair<QUrl, QString> curPair = pScanningData.at(i); QPair<QUrl, UBFeature> curPair = pScanningData.at(i);
emit scanCategory(UBFeaturesController::categoryNameForVirtualPath(curPair.second)); emit scanCategory(curPair.second.getDisplayName());
scanFS(curPair.first, curPair.second, pFavoriteSet); scanFS(curPair.first, curPair.second.getFullVirtualPath(), pFavoriteSet);
} }
} }
@ -109,11 +108,11 @@ int UBFeaturesComputingThread::featuresCount(const QUrl &pPath)
return noItems; return noItems;
} }
int UBFeaturesComputingThread::featuresCountAll(QList<QPair<QUrl, QString> > pScanningData) int UBFeaturesComputingThread::featuresCountAll(QList<QPair<QUrl, UBFeature> > pScanningData)
{ {
int noItems = 0; int noItems = 0;
for (int i = 0; i < pScanningData.count(); i++) { for (int i = 0; i < pScanningData.count(); i++) {
QPair<QUrl, QString> curPair = pScanningData.at(i); QPair<QUrl, UBFeature> curPair = pScanningData.at(i);
noItems += featuresCount(curPair.first); noItems += featuresCount(curPair.first);
} }
@ -127,7 +126,7 @@ QThread(parent)
abort = false; abort = false;
} }
void UBFeaturesComputingThread::compute(const QList<QPair<QUrl, QString> > &pScanningData, QSet<QUrl> *pFavoritesSet) void UBFeaturesComputingThread::compute(const QList<QPair<QUrl, UBFeature> > &pScanningData, QSet<QUrl> *pFavoritesSet)
{ {
QMutexLocker curLocker(&mMutex); QMutexLocker curLocker(&mMutex);
@ -148,7 +147,7 @@ void UBFeaturesComputingThread::run()
qDebug() << "Custom thread started execution"; qDebug() << "Custom thread started execution";
mMutex.lock(); mMutex.lock();
QList<QPair<QUrl, QString> > searchData = mScanningData; QList<QPair<QUrl, UBFeature> > searchData = mScanningData;
QSet<QUrl> favoriteSet = mFavoriteSet; QSet<QUrl> favoriteSet = mFavoriteSet;
mMutex.unlock(); mMutex.unlock();
@ -339,24 +338,24 @@ UBFeaturesController::UBFeaturesController(QWidget *pParentWidget) :
void UBFeaturesController::startThread() void UBFeaturesController::startThread()
{ {
QList<QPair<QUrl, QString> > computingData; QList<QPair<QUrl, UBFeature> > computingData;
computingData << QPair<QUrl, QString>(mLibAudiosDirectoryPath, audiosPath) computingData << QPair<QUrl, UBFeature>(mLibAudiosDirectoryPath, audiosElement)
<< QPair<QUrl, QString>(mLibVideosDirectoryPath, moviesPath) << QPair<QUrl, UBFeature>(mLibVideosDirectoryPath, moviesElement)
<< QPair<QUrl, QString>(mLibAnimationsDirectoryPath, flashPath) << QPair<QUrl, UBFeature>(mLibAnimationsDirectoryPath, flashElement)
<< QPair<QUrl, QString>(mLibPicturesDirectoryPath, picturesPath) << QPair<QUrl, UBFeature>(mLibPicturesDirectoryPath, picturesElement)
<< QPair<QUrl, QString>(mUserInteractiveDirectoryPath, appPath) << QPair<QUrl, UBFeature>(mUserInteractiveDirectoryPath, applicationsElement)
<< QPair<QUrl, QString>(mUserAudioDirectoryPath, audiosPath) << QPair<QUrl, UBFeature>(mUserAudioDirectoryPath, audiosElement)
<< QPair<QUrl, QString>(mUserPicturesDirectoryPath, picturesPath) << QPair<QUrl, UBFeature>(mUserPicturesDirectoryPath, picturesElement)
<< QPair<QUrl, QString>(mUserVideoDirectoryPath, moviesPath) << QPair<QUrl, UBFeature>(mUserVideoDirectoryPath, moviesElement)
<< QPair<QUrl, QString>(mUserAnimationDirectoryPath, flashPath) << QPair<QUrl, UBFeature>(mUserAnimationDirectoryPath, flashElement)
<< QPair<QUrl, QString>(mLibApplicationsDirectoryPath, appPath) << QPair<QUrl, UBFeature>(mLibApplicationsDirectoryPath, applicationsElement)
<< QPair<QUrl, QString>(mLibShapesDirectoryPath, shapesPath) << QPair<QUrl, UBFeature>(mLibShapesDirectoryPath, shapesElement)
<< QPair<QUrl, QString>(mLibInteractiveDirectoryPath, interactPath) << QPair<QUrl, UBFeature>(mLibInteractiveDirectoryPath, interactElement)
<< QPair<QUrl, QString>(trashDirectoryPath, trashPath) << QPair<QUrl, UBFeature>(trashDirectoryPath, trashElement)
<< QPair<QUrl, QString>(mLibSearchDirectoryPath, rootPath + "/" + "Web search"); << QPair<QUrl, UBFeature>(mLibSearchDirectoryPath, webSearchElement);
mCThread.compute(computingData, favoriteSet); mCThread.compute(computingData, favoriteSet);
} }

@ -33,7 +33,7 @@ class UBFeaturesComputingThread : public QThread
public: public:
explicit UBFeaturesComputingThread(QObject *parent = 0); explicit UBFeaturesComputingThread(QObject *parent = 0);
virtual ~UBFeaturesComputingThread(); virtual ~UBFeaturesComputingThread();
void compute(const QList<QPair<QUrl, QString> > &pScanningData, QSet<QUrl> *pFavoritesSet); void compute(const QList<QPair<QUrl, UBFeature> > &pScanningData, QSet<QUrl> *pFavoritesSet);
protected: protected:
void run(); void run();
@ -51,16 +51,16 @@ public slots:
private: private:
void scanFS(const QUrl & currentPath, const QString & currVirtualPath, const QSet<QUrl> &pFavoriteSet); void scanFS(const QUrl & currentPath, const QString & currVirtualPath, const QSet<QUrl> &pFavoriteSet);
void scanAll(QList<QPair<QUrl, QString> > pScanningData, const QSet<QUrl> &pFavoriteSet); void scanAll(QList<QPair<QUrl, UBFeature> > pScanningData, const QSet<QUrl> &pFavoriteSet);
int featuresCount(const QUrl &pPath); int featuresCount(const QUrl &pPath);
int featuresCountAll(QList<QPair<QUrl, QString> > pScanningData); int featuresCountAll(QList<QPair<QUrl, UBFeature> > pScanningData);
private: private:
QMutex mMutex; QMutex mMutex;
QWaitCondition mWaitCondition; QWaitCondition mWaitCondition;
QUrl mScanningPath; QUrl mScanningPath;
QString mScanningVirtualPath; QString mScanningVirtualPath;
QList<QPair<QUrl, QString> > mScanningData; QList<QPair<QUrl, UBFeature> > mScanningData;
QSet<QUrl> mFavoriteSet; QSet<QUrl> mFavoriteSet;
bool restart; bool restart;
bool abort; bool abort;

@ -86,7 +86,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
mTransparentDrawingView->setScene(mTransparentDrawingScene); mTransparentDrawingView->setScene(mTransparentDrawingScene);
mTransparentDrawingScene->setDrawingMode(true); 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()) if (UBPlatformUtils::hasVirtualKeyboard())
{ {
@ -119,13 +119,13 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
connect(UBDrawingController::drawingController(), SIGNAL(stylusToolChanged(int)), this, SLOT(stylusToolChanged(int))); connect(UBDrawingController::drawingController(), SIGNAL(stylusToolChanged(int)), this, SLOT(stylusToolChanged(int)));
// Add the desktop associated palettes // 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(maximized()), mDesktopPenPalette, SLOT(onParentMaximized()));
connect(mDesktopPalette, SIGNAL(minimizeStart(eMinimizedLocation)), mDesktopPenPalette, SLOT(onParentMinimized())); connect(mDesktopPalette, SIGNAL(minimizeStart(eMinimizedLocation)), mDesktopPenPalette, SLOT(onParentMinimized()));
mDesktopMarkerPalette = new UBDesktopMarkerPalette(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(mTransparentDrawingView); 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); mDesktopPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor);
mDesktopPenPalette->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())); connect(UBApplication::boardController->paletteManager()->rightPalette(), SIGNAL(resized()), this, SLOT(refreshMask()));
#endif #endif
onDesktopPaletteMaximized(); onDesktopPaletteMaximized();
// FIX #633: Ensure that these palettes stay on top of the other elements
mDesktopEraserPalette->raise();
mDesktopMarkerPalette->raise();
mDesktopPenPalette->raise();
mDesktopPalette->raise();
} }
UBDesktopAnnotationController::~UBDesktopAnnotationController() UBDesktopAnnotationController::~UBDesktopAnnotationController()
@ -243,11 +249,7 @@ void UBDesktopAnnotationController::setAssociatedPalettePosition(UBActionPalette
if(act->objectName() == actionName) if(act->objectName() == actionName)
{ {
int iAction = actions.indexOf(act); int iAction = actions.indexOf(act);
yPen = iAction * mDesktopPalette->buttonSize().height(); yPen = iAction * (mDesktopPalette->buttonSize().height() + 2 * mDesktopPalette->border() +6); // This is the mysterious value (6)
// Add the borders
yPen += (iAction) * (mDesktopPalette->border() + 4); // 4 has been set after some experiment. We must determine why this value is good
break; break;
} }
} }

@ -676,7 +676,7 @@ UBFeaturesProgressInfo::UBFeaturesProgressInfo(QWidget *parent) :
void UBFeaturesProgressInfo::setCommmonInfoText(const QString &str) void UBFeaturesProgressInfo::setCommmonInfoText(const QString &str)
{ {
mProgressBar->setFormat(str + tr(" load") + "(%p%)"); mProgressBar->setFormat(tr("Loading ") + str + " (%p%)");
} }
void UBFeaturesProgressInfo::setDetailedInfoText(const QString &str) void UBFeaturesProgressInfo::setDetailedInfoText(const QString &str)

@ -25,6 +25,7 @@ UBPropertyPalette::UBPropertyPalette(QWidget *parent, const char *name):UBAction
{ {
setObjectName(name); setObjectName(name);
mbGrip = false; 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) UBPropertyPalette::UBPropertyPalette(Qt::Orientation orientation, QWidget *parent):UBActionPalette(orientation, parent)
{ {
mbGrip = false; mbGrip = false;
setMaximumHeight(MAX_HEIGHT);
} }
/** /**

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

@ -12,11 +12,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <QObject>
#include <QString> #include <QString>
#include <QCursor> #include <QCursor>
#include "UBThumbnailWidget.h" #include "UBThumbnailWidget.h"
#include "UBRubberBand.h" #include "UBRubberBand.h"
#include "UBMainWindow.h"
#include "board/UBBoardController.h" #include "board/UBBoardController.h"
@ -858,7 +860,9 @@ void UBSceneThumbnailNavigPixmap::updateButtonsState()
void UBSceneThumbnailNavigPixmap::deletePage() void UBSceneThumbnailNavigPixmap::deletePage()
{ {
if(UBApplication::mainWindow->yesNoQuestion(QObject::tr("Remove Page"), QObject::tr("Are you sure you want to remove 1 page from the selected document '%0'?").arg(UBApplication::documentController->selectedDocument()->metaData(UBSettings::documentName).toString()))){
UBApplication::boardController->deleteScene(sceneIndex()); UBApplication::boardController->deleteScene(sceneIndex());
}
} }
void UBSceneThumbnailNavigPixmap::duplicatePage() void UBSceneThumbnailNavigPixmap::duplicatePage()

Loading…
Cancel
Save