Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
e90d2d33
Commit
e90d2d33
authored
Jun 20, 2011
by
Cédric Luthi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace UBPlatformUtils::disableShadow() with setAttribute(Qt::WA_MacNoShadow, true)
parent
03b32dbb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
4 additions
and
40 deletions
+4
-40
UBDisplayManager.cpp
src/core/UBDisplayManager.cpp
+2
-2
UBDesktopAnnotationController.cpp
src/desktop/UBDesktopAnnotationController.cpp
+1
-10
UBPlatformUtils.h
src/frameworks/UBPlatformUtils.h
+0
-2
UBPlatformUtils_linux.cpp
src/frameworks/UBPlatformUtils_linux.cpp
+0
-6
UBPlatformUtils_mac.mm
src/frameworks/UBPlatformUtils_mac.mm
+0
-13
UBPlatformUtils_win.cpp
src/frameworks/UBPlatformUtils_win.cpp
+0
-6
UBDockPalette.cpp
src/gui/UBDockPalette.cpp
+1
-1
No files found.
src/core/UBDisplayManager.cpp
View file @
e90d2d33
...
...
@@ -114,7 +114,7 @@ void UBDisplayManager::setAsControl(QWidget* pControlWidget )
mControlWidget
->
hide
();
mControlWidget
->
setGeometry
(
mDesktop
->
screenGeometry
(
mControlScreenIndex
));
mControlWidget
->
showFullScreen
();
UBPlatformUtils
::
disableShadow
(
mControlWidget
);
mControlWidget
->
setAttribute
(
Qt
::
WA_MacNoShadow
);
}
}
...
...
@@ -127,7 +127,7 @@ void UBDisplayManager::setAsDisplay(QWidget* pDisplayWidget)
mDisplayWidget
->
hide
();
mDisplayWidget
->
setGeometry
(
mDesktop
->
screenGeometry
(
mDisplayScreenIndex
));
mDisplayWidget
->
showFullScreen
();
UBPlatformUtils
::
disableShadow
(
mDisplayWidget
);
mDisplayWidget
->
setAttribute
(
Qt
::
WA_MacNoShadow
);
}
}
...
...
src/desktop/UBDesktopAnnotationController.cpp
View file @
e90d2d33
...
...
@@ -61,14 +61,13 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
mTransparentDrawingView
=
new
UBBoardView
(
UBApplication
::
boardController
,
0
);
// deleted in UBDesktopAnnotationController::destructor
mTransparentDrawingView
->
setAttribute
(
Qt
::
WA_TranslucentBackground
,
true
);
mTransparentDrawingView
->
setAttribute
(
Qt
::
WA_MacNoShadow
,
true
);
mTransparentDrawingView
->
setWindowFlags
(
Qt
::
FramelessWindowHint
|
Qt
::
WindowStaysOnTopHint
|
Qt
::
Window
);
mTransparentDrawingView
->
setCacheMode
(
QGraphicsView
::
CacheNone
);
mTransparentDrawingView
->
resize
(
UBApplication
::
desktop
()
->
width
(),
UBApplication
::
desktop
()
->
height
());
mTransparentDrawingView
->
setMouseTracking
(
true
);
UBPlatformUtils
::
disableShadow
(
mTransparentDrawingView
);
mTransparentDrawingView
->
setAcceptDrops
(
false
);
QString
backgroundStyle
=
"QWidget {background-color: rgba(127, 127, 127, 0)}"
;
...
...
@@ -78,10 +77,8 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
mTransparentDrawingView
->
setScene
(
mTransparentDrawingScene
);
mLibPalette
=
new
UBLibPalette
(
mTransparentDrawingView
);
UBPlatformUtils
::
disableShadow
(
mLibPalette
);
mDesktopPalette
=
new
UBDesktopPalette
(
mTransparentDrawingView
);
UBPlatformUtils
::
disableShadow
(
mDesktopPalette
);
connect
(
mDesktopPalette
,
SIGNAL
(
uniboardClick
()),
this
,
SLOT
(
goToUniboard
()));
//connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(showKeyboard(bool)));
...
...
@@ -100,17 +97,13 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
// Add the desktop associated palettes
mDesktopToolsPalette
=
new
UBDesktopToolsPalette
(
mTransparentDrawingView
);
UBPlatformUtils
::
disableShadow
(
mDesktopToolsPalette
);
mDesktopPenPalette
=
new
UBDesktopPenPalette
(
mTransparentDrawingView
);
UBPlatformUtils
::
disableShadow
(
mDesktopPenPalette
);
connect
(
mDesktopPalette
,
SIGNAL
(
maximized
()),
mDesktopPenPalette
,
SLOT
(
onParentMaximized
()));
connect
(
mDesktopPalette
,
SIGNAL
(
minimizeStart
(
eMinimizedLocation
)),
mDesktopPenPalette
,
SLOT
(
onParentMinimized
()));
mDesktopMarkerPalette
=
new
UBDesktopMarkerPalette
(
mTransparentDrawingView
);
UBPlatformUtils
::
disableShadow
(
mDesktopMarkerPalette
);
mDesktopEraserPalette
=
new
UBDesktopEraserPalette
(
mTransparentDrawingView
);
UBPlatformUtils
::
disableShadow
(
mDesktopEraserPalette
);
if
(
UBPlatformUtils
::
hasVirtualKeyboard
())
{
mKeyboardPalette
=
UBKeyboardPalette
::
create
(
mTransparentDrawingView
);
...
...
@@ -331,8 +324,6 @@ void UBDesktopAnnotationController::showWindow()
UBDrawingController
::
drawingController
()
->
setStylusTool
(
mDesktopStylusTool
);
mTransparentDrawingView
->
showFullScreen
();
UBPlatformUtils
::
disableShadow
(
mTransparentDrawingView
);
UBPlatformUtils
::
setDesktopMode
(
true
);
...
...
src/frameworks/UBPlatformUtils.h
View file @
e90d2d33
...
...
@@ -95,8 +95,6 @@ class UBPlatformUtils
static
QString
preferredTranslation
();
static
QString
preferredLanguage
();
static
void
disableShadow
(
QWidget
*
widget
);
static
bool
hasVirtualKeyboard
();
//static void showVirtualKeyboard();
...
...
src/frameworks/UBPlatformUtils_linux.cpp
View file @
e90d2d33
...
...
@@ -53,12 +53,6 @@ QString UBPlatformUtils::preferredLanguage()
return
QLocale
::
system
().
name
();
}
void
UBPlatformUtils
::
disableShadow
(
QWidget
*
widget
)
{
Q_UNUSED
(
widget
)
// Linux windows do not have a shadow
}
void
UBPlatformUtils
::
runInstaller
(
const
QString
&
installerFilePath
)
{
// TODO UB 4.x - auto update & installer are deactivated on Linux
...
...
src/frameworks/UBPlatformUtils_mac.mm
View file @
e90d2d33
...
...
@@ -205,19 +205,6 @@ QString UBPlatformUtils::preferredLanguage()
return lprojFileInfo.baseName();
}
void UBPlatformUtils::disableShadow(QWidget *widget)
{
#ifndef QT_MAC_USE_COCOA
// Make sure we have a native window, see http://doc.trolltech.com/4.5/qwidget.html#native-widgets-vs-alien-widgets
widget->winId();
ChangeWindowAttributes(qt_mac_window_for(widget), kWindowNoShadowAttribute, kWindowNoAttributes);
#else
NSView* view = (NSView*)widget->winId();
NSWindow* window = [view window];
[window setHasShadow:NO];
#endif
}
void UBPlatformUtils::runInstaller(const QString &installerFilePath)
{
UBApplication::setDisabled(true);
...
...
src/frameworks/UBPlatformUtils_win.cpp
View file @
e90d2d33
...
...
@@ -61,12 +61,6 @@ QString UBPlatformUtils::preferredLanguage()
return
QLocale
::
system
().
name
();
}
void
UBPlatformUtils
::
disableShadow
(
QWidget
*
widget
)
{
Q_UNUSED
(
widget
);
// Windows windows do not have a shadow
}
//void UBPlatformUtils::showVirtualKeyboard()
//{
// ShellExecute(NULL,NULL,TEXT("tabtip.exe"), NULL, NULL, SW_SHOWNORMAL);
...
...
src/gui/UBDockPalette.cpp
View file @
e90d2d33
...
...
@@ -33,7 +33,7 @@ UBDockPalette::UBDockPalette(QWidget *parent, const char *name)
{
// standalone window
setAttribute
(
Qt
::
WA_TranslucentBackground
);
UBPlatformUtils
::
disableShadow
(
this
);
setAttribute
(
Qt
::
WA_MacNoShadow
);
}
mBackgroundBrush
=
QBrush
(
UBSettings
::
paletteColor
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment