[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [latte-dock] /: fix #946,improve kwin edges support
From: Michail Vourlakos <null () kde ! org>
Date: 2018-03-31 22:08:08
Message-ID: E1f2OfQ-0008Hd-0A () code ! kde ! org
[Download RAW message or body]
Git commit da5cb9c61f14a608a0e5d1992c34a3dd0d954d3b by Michail Vourlakos.
Committed on 31/03/2018 at 22:04.
Pushed by mvourlakos into branch 'master'.
fix #946,improve kwin edges support
--make the behaviour more robust and be more
precise at geometries used at all times
M +1 -0 app/dock/dockview.h
M +4 -2 app/dock/screenedgeghostwindow.cpp
M +14 -0 containment/package/contents/ui/DebugWindow.qml
M +2 -2 containment/package/contents/ui/VisibilityManager.qml
https://commits.kde.org/latte-dock/da5cb9c61f14a608a0e5d1992c34a3dd0d954d3b
diff --git a/app/dock/dockview.h b/app/dock/dockview.h
index 3da0837..8b15d5a 100644
--- a/app/dock/dockview.h
+++ b/app/dock/dockview.h
@@ -97,6 +97,7 @@ class DockView : public PlasmaQuick::ContainmentView {
Q_PROPERTY(QQmlListProperty<QScreen> screens READ screens)
Q_PROPERTY(QRect effectsArea READ effectsArea WRITE setEffectsArea NOTIFY \
effectsAreaChanged) + Q_PROPERTY(QRect absoluteGeometry READ absGeometry NOTIFY \
absGeometryChanged)
Q_PROPERTY(QRect localGeometry READ localGeometry WRITE setLocalGeometry NOTIFY \
localGeometryChanged)
Q_PROPERTY(QRect maskArea READ maskArea WRITE setMaskArea NOTIFY \
maskAreaChanged)
Q_PROPERTY(QRect screenGeometry READ screenGeometry NOTIFY \
screenGeometryChanged)
diff --git a/app/dock/screenedgeghostwindow.cpp b/app/dock/screenedgeghostwindow.cpp
index dc349af..1309d8d 100644
--- a/app/dock/screenedgeghostwindow.cpp
+++ b/app/dock/screenedgeghostwindow.cpp
@@ -47,6 +47,7 @@ ScreenEdgeGhostWindow::ScreenEdgeGhostWindow(DockView *view) :
connect(m_dockView, &DockView::absGeometryChanged, this, \
&ScreenEdgeGhostWindow::updateGeometry);
connect(m_dockView, &DockView::screenGeometryChanged, this, \
&ScreenEdgeGhostWindow::updateGeometry); + connect(m_dockView, \
&DockView::locationChanged, this, &ScreenEdgeGhostWindow::updateGeometry); \
connect(m_dockView, &QQuickView::screenChanged, this, [this]() { \
setScreen(m_dockView->screen()); });
@@ -132,15 +133,16 @@ void ScreenEdgeGhostWindow::updateGeometry()
}
if (m_dockView->formFactor() == Plasma::Types::Horizontal) {
- newGeometry.setWidth(m_dockView->absGeometry().width());
+ newGeometry.setWidth(qMin(m_dockView->absGeometry().width(), \
m_dockView->screenGeometry().width() - 1)); newGeometry.setHeight(thickness + 1);
} else {
newGeometry.setWidth(thickness + 1);
- newGeometry.setHeight(m_dockView->absGeometry().height());
+ newGeometry.setHeight(qMin(m_dockView->absGeometry().height(), \
m_dockView->screenGeometry().height() - 1)); }
setMinimumSize(newGeometry.size());
setMaximumSize(newGeometry.size());
+ resize(newGeometry.size());
setPosition(newGeometry.x(), newGeometry.y());
if (m_shellSurface) {
diff --git a/containment/package/contents/ui/DebugWindow.qml \
b/containment/package/contents/ui/DebugWindow.qml index caa0c73..21e3aed 100644
--- a/containment/package/contents/ui/DebugWindow.qml
+++ b/containment/package/contents/ui/DebugWindow.qml
@@ -157,6 +157,20 @@ Window{
}
}
+ Text{
+ text: "Absolute Geometry"+space
+ }
+
+ Text{
+ text: {
+ if (dock && dock.absoluteGeometry) {
+ return dock.absoluteGeometry.x + ", " + \
dock.absoluteGeometry.y + " " + dock.absoluteGeometry.width + "x" + \
dock.absoluteGeometry.height; + } else {
+ return "_,_ _x_";
+ }
+ }
+ }
+
Text{
text: "Local Geometry"+space
}
diff --git a/containment/package/contents/ui/VisibilityManager.qml \
b/containment/package/contents/ui/VisibilityManager.qml index 8b641e4..fd5e620 100644
--- a/containment/package/contents/ui/VisibilityManager.qml
+++ b/containment/package/contents/ui/VisibilityManager.qml
@@ -465,8 +465,8 @@ Item{
}
//console.log("reached updating geometry ::: "+dock.maskArea);
- if((normalState && !dock.visibility.isHidden)
- && !(root.behaveAsPlasmaPanel && root.editMode)){
+ if(normalState){
+
var tempGeometry = Qt.rect(dock.maskArea.x, dock.maskArea.y, \
dock.maskArea.width, dock.maskArea.height);
//the shadows size must be removed from the maskArea
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic