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 5 years ago
parent 853782394b
commit 8ccf7480c4
  1. 19
      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) void UBDesktopAnnotationController::stylusToolChanged(int tool)
{ {
Q_UNUSED(tool); Q_UNUSED(tool);
// UBStylusTool::Enum eTool = (UBStylusTool::Enum)tool;
// if(eTool != UBStylusTool::Selector && eTool != UBStylusTool::Text) if (UBDrawingController::drawingController()->isInDesktopMode())
// { {
// if(mKeyboardPalette->m_isVisible) UBStylusTool::Enum eTool = (UBStylusTool::Enum)tool;
// UBApplication::mainWindow->actionVirtualKeyboard->activate(QAction::Trigger); if(eTool == UBStylusTool::Selector)
// } {
UBPlatformUtils::toggleFinder(true);
}
else
{
UBPlatformUtils::toggleFinder(false);
}
updateBackground(); updateBackground();
}
} }

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

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

Loading…
Cancel
Save