mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 07:31:33 +08:00
Some changes to fix build for windows
This commit is contained in:
parent
d2f751ef87
commit
b1309da89a
@ -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
|
||||
*/
|
||||
void setTitleBarButtonIcon(tTileBarButton* Button, QStyle::StandardPixmap StandarPixmap)
|
||||
|
@ -137,7 +137,7 @@ struct DockOverlayCrossPrivate
|
||||
* Helper function that returns the drop indicator width depending on the
|
||||
* operating system
|
||||
*/
|
||||
qreal dropIndicatiorWidth() const
|
||||
qreal dropIndicatiorWidth(QLabel* l) const
|
||||
{
|
||||
#ifdef Q_OS_LINUX
|
||||
return 40;
|
||||
@ -154,7 +154,7 @@ struct DockOverlayCrossPrivate
|
||||
QLabel* l = new QLabel();
|
||||
l->setObjectName("DockWidgetAreaLabel");
|
||||
|
||||
const qreal metric = dropIndicatiorWidth();
|
||||
const qreal metric = dropIndicatiorWidth(l);
|
||||
const QSizeF size(metric, metric);
|
||||
|
||||
l->setPixmap(createHighDpiDropIndicatorPixmap(size, DockWidgetArea, Mode));
|
||||
@ -168,7 +168,7 @@ struct DockOverlayCrossPrivate
|
||||
void updateDropIndicatorIcon(QWidget* DropIndicatorWidget)
|
||||
{
|
||||
QLabel* l = qobject_cast<QLabel*>(DropIndicatorWidget);
|
||||
const qreal metric = dropIndicatiorWidth();
|
||||
const qreal metric = dropIndicatiorWidth(l);
|
||||
const QSizeF size(metric, metric);
|
||||
|
||||
int Area = l->property("dockWidgetArea").toInt();
|
||||
|
@ -38,8 +38,6 @@
|
||||
#include <QDebug>
|
||||
#include <QAbstractButton>
|
||||
#include <QElapsedTimer>
|
||||
#include <QTime>
|
||||
#include <QAbstractEventDispatcher>
|
||||
|
||||
#include "DockContainerWidget.h"
|
||||
#include "DockAreaWidget.h"
|
||||
@ -52,8 +50,6 @@
|
||||
#include <xcb/xcb.h>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
namespace ads
|
||||
{
|
||||
@ -71,8 +67,10 @@ struct FloatingDockContainerPrivate
|
||||
QPoint DragStartMousePosition;
|
||||
CDockContainerWidget* DropContainer = nullptr;
|
||||
CDockAreaWidget* SingleDockArea = nullptr;
|
||||
#ifdef Q_OS_LINUX
|
||||
QWidget* MouseEventHandler = nullptr;
|
||||
CFloatingWidgetTitleBar* TitleBar = nullptr;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Private data constructor
|
||||
@ -257,6 +255,7 @@ CFloatingDockContainer::CFloatingDockContainer(CDockManager* DockManager) :
|
||||
l->setContentsMargins(0, 0, 0, 0);
|
||||
l->setSpacing(0);
|
||||
setLayout(l);
|
||||
l->addWidget(d->DockContainer);
|
||||
#endif
|
||||
|
||||
DockManager->registerFloatingWidget(this);
|
||||
@ -494,6 +493,9 @@ bool CFloatingDockContainer::eventFilter(QObject *watched, QEvent *event)
|
||||
void CFloatingDockContainer::startFloating(const QPoint& DragStartMousePos, const QSize& Size,
|
||||
eDragState DragState, QWidget* MouseEventHandler)
|
||||
{
|
||||
#ifndef Q_OS_LINUX
|
||||
Q_UNUSED(MouseEventHandler)
|
||||
#endif
|
||||
resize(Size);
|
||||
d->setState(DragState);
|
||||
d->DragStartMousePosition = DragStartMousePos;
|
||||
@ -617,7 +619,7 @@ QList<CDockWidget*> CFloatingDockContainer::dockWidgets() const
|
||||
//============================================================================
|
||||
void CFloatingDockContainer::finishDragging()
|
||||
{
|
||||
std::cout << "CFloatingDockContainer::finishDragging" << std::endl;
|
||||
qDebug() << "CFloatingDockContainer::finishDragging";
|
||||
#ifdef Q_OS_LINUX
|
||||
setAttribute(Qt::WA_X11NetWmWindowTypeDock, false);
|
||||
setWindowOpacity(1);
|
||||
|
Loading…
Reference in New Issue
Block a user