make the dock appear when the cursor selector is choosen so we can navigate through other apps (due to the issue regarding transparent view and interactions with other apps (OSX only))

preferencesAboutTextFull
Clément Fauconnier 4 years ago
parent 853782394b
commit 8ccf7480c4
  1. 21
      src/desktop/UBDesktopAnnotationController.cpp
  2. 1
      src/frameworks/UBPlatformUtils.h
  3. 12
      src/frameworks/UBPlatformUtils_mac.mm

@ -374,14 +374,21 @@ void UBDesktopAnnotationController::close()
void UBDesktopAnnotationController::stylusToolChanged(int tool)
{
Q_UNUSED(tool);
// UBStylusTool::Enum eTool = (UBStylusTool::Enum)tool;
// if(eTool != UBStylusTool::Selector && eTool != UBStylusTool::Text)
// {
// if(mKeyboardPalette->m_isVisible)
// UBApplication::mainWindow->actionVirtualKeyboard->activate(QAction::Trigger);
// }
updateBackground();
if (UBDrawingController::drawingController()->isInDesktopMode())
{
UBStylusTool::Enum eTool = (UBStylusTool::Enum)tool;
if(eTool == UBStylusTool::Selector)
{
UBPlatformUtils::toggleFinder(true);
}
else
{
UBPlatformUtils::toggleFinder(false);
}
updateBackground();
}
}

@ -212,6 +212,7 @@ public:
#ifdef Q_OS_OSX
static void SetMacLocaleByIdentifier(const QString& id);
static void toggleFinder(const bool on);
#endif
};

@ -524,6 +524,18 @@ QString UBPlatformUtils::urlFromClipboard()
return qsRet;
}
void UBPlatformUtils::toggleFinder(const bool on)
{
if (on)
{
[NSApp setPresentationOptions:NSApplicationPresentationDefault];
}
else
{
[NSApp setPresentationOptions:NSApplicationPresentationHideMenuBar | NSApplicationPresentationHideDock];
}
}
void UBPlatformUtils::SetMacLocaleByIdentifier(const QString& id)
{

Loading…
Cancel
Save