Some changes to fix build for windows

This commit is contained in:
Uwe Kindler 2019-07-12 10:37:14 +02:00
parent d2f751ef87
commit b1309da89a
3 changed files with 11 additions and 9 deletions

View File

@ -99,7 +99,7 @@ struct DockAreaTitleBarPrivate
} }
/** /**
* Helper class to set title bar burron icons depending on operating system * Helper class to set title bar button icons depending on operating system
* and to avoid duplicated code * and to avoid duplicated code
*/ */
void setTitleBarButtonIcon(tTileBarButton* Button, QStyle::StandardPixmap StandarPixmap) void setTitleBarButtonIcon(tTileBarButton* Button, QStyle::StandardPixmap StandarPixmap)

View File

@ -137,7 +137,7 @@ struct DockOverlayCrossPrivate
* Helper function that returns the drop indicator width depending on the * Helper function that returns the drop indicator width depending on the
* operating system * operating system
*/ */
qreal dropIndicatiorWidth() const qreal dropIndicatiorWidth(QLabel* l) const
{ {
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
return 40; return 40;
@ -154,7 +154,7 @@ struct DockOverlayCrossPrivate
QLabel* l = new QLabel(); QLabel* l = new QLabel();
l->setObjectName("DockWidgetAreaLabel"); l->setObjectName("DockWidgetAreaLabel");
const qreal metric = dropIndicatiorWidth(); const qreal metric = dropIndicatiorWidth(l);
const QSizeF size(metric, metric); const QSizeF size(metric, metric);
l->setPixmap(createHighDpiDropIndicatorPixmap(size, DockWidgetArea, Mode)); l->setPixmap(createHighDpiDropIndicatorPixmap(size, DockWidgetArea, Mode));
@ -168,7 +168,7 @@ struct DockOverlayCrossPrivate
void updateDropIndicatorIcon(QWidget* DropIndicatorWidget) void updateDropIndicatorIcon(QWidget* DropIndicatorWidget)
{ {
QLabel* l = qobject_cast<QLabel*>(DropIndicatorWidget); QLabel* l = qobject_cast<QLabel*>(DropIndicatorWidget);
const qreal metric = dropIndicatiorWidth(); const qreal metric = dropIndicatiorWidth(l);
const QSizeF size(metric, metric); const QSizeF size(metric, metric);
int Area = l->property("dockWidgetArea").toInt(); int Area = l->property("dockWidgetArea").toInt();

View File

@ -38,8 +38,6 @@
#include <QDebug> #include <QDebug>
#include <QAbstractButton> #include <QAbstractButton>
#include <QElapsedTimer> #include <QElapsedTimer>
#include <QTime>
#include <QAbstractEventDispatcher>
#include "DockContainerWidget.h" #include "DockContainerWidget.h"
#include "DockAreaWidget.h" #include "DockAreaWidget.h"
@ -52,8 +50,6 @@
#include <xcb/xcb.h> #include <xcb/xcb.h>
#endif #endif
#include <iostream>
namespace ads namespace ads
{ {
@ -71,8 +67,10 @@ struct FloatingDockContainerPrivate
QPoint DragStartMousePosition; QPoint DragStartMousePosition;
CDockContainerWidget* DropContainer = nullptr; CDockContainerWidget* DropContainer = nullptr;
CDockAreaWidget* SingleDockArea = nullptr; CDockAreaWidget* SingleDockArea = nullptr;
#ifdef Q_OS_LINUX
QWidget* MouseEventHandler = nullptr; QWidget* MouseEventHandler = nullptr;
CFloatingWidgetTitleBar* TitleBar = nullptr; CFloatingWidgetTitleBar* TitleBar = nullptr;
#endif
/** /**
* Private data constructor * Private data constructor
@ -257,6 +255,7 @@ CFloatingDockContainer::CFloatingDockContainer(CDockManager* DockManager) :
l->setContentsMargins(0, 0, 0, 0); l->setContentsMargins(0, 0, 0, 0);
l->setSpacing(0); l->setSpacing(0);
setLayout(l); setLayout(l);
l->addWidget(d->DockContainer);
#endif #endif
DockManager->registerFloatingWidget(this); DockManager->registerFloatingWidget(this);
@ -494,6 +493,9 @@ bool CFloatingDockContainer::eventFilter(QObject *watched, QEvent *event)
void CFloatingDockContainer::startFloating(const QPoint& DragStartMousePos, const QSize& Size, void CFloatingDockContainer::startFloating(const QPoint& DragStartMousePos, const QSize& Size,
eDragState DragState, QWidget* MouseEventHandler) eDragState DragState, QWidget* MouseEventHandler)
{ {
#ifndef Q_OS_LINUX
Q_UNUSED(MouseEventHandler)
#endif
resize(Size); resize(Size);
d->setState(DragState); d->setState(DragState);
d->DragStartMousePosition = DragStartMousePos; d->DragStartMousePosition = DragStartMousePos;
@ -617,7 +619,7 @@ QList<CDockWidget*> CFloatingDockContainer::dockWidgets() const
//============================================================================ //============================================================================
void CFloatingDockContainer::finishDragging() void CFloatingDockContainer::finishDragging()
{ {
std::cout << "CFloatingDockContainer::finishDragging" << std::endl; qDebug() << "CFloatingDockContainer::finishDragging";
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
setAttribute(Qt::WA_X11NetWmWindowTypeDock, false); setAttribute(Qt::WA_X11NetWmWindowTypeDock, false);
setWindowOpacity(1); setWindowOpacity(1);