qml: The inner indicators are now centered
This commit is contained in:
@@ -41,6 +41,11 @@ void DropIndicatorOverlayInterface::setWindowBeingDragged(const FloatingWindow *
|
||||
updateVisibility();
|
||||
}
|
||||
|
||||
QRect DropIndicatorOverlayInterface::hoveredFrameRect() const
|
||||
{
|
||||
return m_hoveredFrameRect;
|
||||
}
|
||||
|
||||
void DropIndicatorOverlayInterface::setHoveredFrame(Frame *frame)
|
||||
{
|
||||
if (frame == m_hoveredFrame)
|
||||
@@ -50,8 +55,12 @@ void DropIndicatorOverlayInterface::setHoveredFrame(Frame *frame)
|
||||
disconnect(m_hoveredFrame, &QObject::destroyed, this, &DropIndicatorOverlayInterface::onFrameDestroyed);
|
||||
|
||||
m_hoveredFrame = frame;
|
||||
if (m_hoveredFrame)
|
||||
if (m_hoveredFrame) {
|
||||
connect(frame, &QObject::destroyed, this, &DropIndicatorOverlayInterface::onFrameDestroyed);
|
||||
setHoveredFrameRect(m_hoveredFrame->QWidgetAdapter::rect());
|
||||
} else {
|
||||
setHoveredFrameRect(QRect());
|
||||
}
|
||||
|
||||
updateVisibility();
|
||||
Q_EMIT hoveredFrameChanged(m_hoveredFrame);
|
||||
@@ -101,3 +110,13 @@ void DropIndicatorOverlayInterface::setCurrentDropLocation(DropIndicatorOverlayI
|
||||
{
|
||||
m_currentDropLocation = location;
|
||||
}
|
||||
|
||||
|
||||
void DropIndicatorOverlayInterface::setHoveredFrameRect(QRect rect)
|
||||
{
|
||||
if (m_hoveredFrameRect != rect) {
|
||||
m_hoveredFrameRect = rect;
|
||||
Q_EMIT hoveredFrameRectChanged();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user