Sélectionner une révision Git
DockWidgetTitleBar.cc
-
Kubat a rédigé
Those buttons seems to only work with the MPV view for some strange reasons (don't hover with other views), so disable them for all. Now the 'float' operation is done by double-clicking and the close is done with the view menu.
Kubat a rédigéThose buttons seems to only work with the MPV view for some strange reasons (don't hover with other views), so disable them for all. Now the 'float' operation is done by double-clicking and the close is done with the view menu.
DockWidgetTitleBar.cc 740 o
#include "DockWidgetTitleBar.hh"
using namespace Vivy;
DockWidgetTitleBar::DockWidgetTitleBar(QDockWidget *parent) noexcept
: QWidget(parent)
, attachedDock(parent)
{
if (parent == nullptr)
qFatal("Can't pass a nullptr as a parent widget pointer");
auto *box = new QHBoxLayout(this);
box->addWidget(new QLabel(parent->windowTitle(), this));
qobject_cast<QHBoxLayout *>(layout())->setStretch(0, 1);
}
void
DockWidgetTitleBar::addToDock(QDockWidget *const dock) noexcept
{
DockWidgetTitleBar *const titleBar = new DockWidgetTitleBar(dock);
qDebug() << "Adding" << dock->windowTitle() << "to dock...";
Utils::setTransparentBackgroundForWidget(titleBar);
dock->setTitleBarWidget(titleBar);
}