Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions panels/dock/dockdbusproxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ QString DockDBusProxy::getPluginKey(const QString &pluginName)
void DockDBusProxy::resizeDock(int offset, bool dragging)
{
Q_UNUSED(dragging)
parent()->setIsResizing(true);
parent()->setDockSize(offset);
parent()->setIsResizing(false);
}

bool DockDBusProxy::showInPrimary() const
Expand Down
15 changes: 15 additions & 0 deletions panels/dock/dockpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
, m_compositorReady(false)
, m_launcherShown(false)
, m_contextDragging(false)
, m_isResizing(false)
{
connect(this, &DockPanel::compositorReadyChanged, this, [this] {
if (!m_compositorReady) return;
Expand Down Expand Up @@ -458,6 +459,20 @@
m_helper->checkNeedHideOrNot();
emit contextDraggingChanged();
}

bool DockPanel::isResizing() const
{
return m_isResizing;

}

void DockPanel::setIsResizing(bool resizing)
{
if (m_isResizing == resizing)
return;
m_isResizing = resizing;
emit isResizingChanged(m_isResizing);
}
}

#include "dockpanel.moc"

Check warning on line 478 in panels/dock/dockpanel.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "dockpanel.moc" not found.
6 changes: 6 additions & 0 deletions panels/dock/dockpanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class DockPanel : public DS_NAMESPACE::DPanel, public QDBusContext
Q_PROPERTY(bool showInPrimary READ showInPrimary WRITE setShowInPrimary NOTIFY showInPrimaryChanged FINAL)
Q_PROPERTY(QString screenName READ screenName NOTIFY screenNameChanged FINAL)
Q_PROPERTY(bool locked READ locked WRITE setLocked NOTIFY lockedChanged FINAL)
Q_PROPERTY(bool isResizing READ isResizing WRITE setIsResizing NOTIFY isResizingChanged FINAL)

Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio NOTIFY devicePixelRatioChanged FINAL)

Expand Down Expand Up @@ -98,6 +99,9 @@ class DockPanel : public DS_NAMESPACE::DPanel, public QDBusContext
bool contextDragging() const;
void setContextDragging(bool newContextDragging);

bool isResizing() const;
void setIsResizing(bool resizing);

protected:
bool eventFilter(QObject *watched, QEvent *event) override;

Expand Down Expand Up @@ -126,6 +130,7 @@ private Q_SLOTS:
void lockedChanged(bool locked);

void contextDraggingChanged();
void isResizingChanged(bool isResizing);

private:
ColorTheme m_theme;
Expand All @@ -136,6 +141,7 @@ private Q_SLOTS:
bool m_compositorReady;
bool m_launcherShown;
bool m_contextDragging;
bool m_isResizing;
};

}
4 changes: 2 additions & 2 deletions panels/dock/package/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -484,15 +484,15 @@ Window {
(dock.height - dockCenterPart.implicitHeight) / 2 - (dockLeftPart.implicitHeight + 20) + Math.min((dock.height - dockCenterPart.implicitHeight) / 2 - (dockRightPart.implicitHeight + 20), 0) : 0

Behavior on Layout.leftMargin {
enabled: !dock.isDragging
enabled: !dock.isDragging && !Applet.isResizing
NumberAnimation {
duration: 200
easing.type: Easing.OutCubic
}
}

Behavior on Layout.topMargin {
enabled: !dock.isDragging
enabled: !dock.isDragging && !Applet.isResizing
NumberAnimation {
duration: 200
easing.type: Easing.OutCubic
Expand Down