1818
1919#include " ../core/generation.hpp"
2020#include " ../core/qmlscreen.hpp"
21+ #include " ../core/types.hpp"
2122#include " ../window/panelinterface.hpp"
2223#include " ../window/proxywindow.hpp"
2324#include " util.hpp"
@@ -296,15 +297,14 @@ void XPanelWindow::updateDimensions(bool propagate) {
296297 auto geometry = QRect ();
297298
298299 if (this ->mAnchors .horizontalConstraint ()) {
299- geometry.setX (screenGeometry.x () + this ->mMargins .mLeft );
300- geometry.setWidth (screenGeometry.width () - this ->mMargins .mLeft - this ->mMargins .mRight );
300+ geometry.setX (screenGeometry.x () + this ->mMargins .left );
301+ geometry.setWidth (screenGeometry.width () - this ->mMargins .left - this ->mMargins .right );
301302 } else {
302303 if (this ->mAnchors .mLeft ) {
303- geometry.setX (screenGeometry.x () + this ->mMargins .mLeft );
304+ geometry.setX (screenGeometry.x () + this ->mMargins .left );
304305 } else if (this ->mAnchors .mRight ) {
305306 geometry.setX (
306- screenGeometry.x () + screenGeometry.width () - this ->implicitWidth ()
307- - this ->mMargins .mRight
307+ screenGeometry.x () + screenGeometry.width () - this ->implicitWidth () - this ->mMargins .right
308308 );
309309 } else {
310310 geometry.setX (screenGeometry.x () + screenGeometry.width () / 2 - this ->implicitWidth () / 2 );
@@ -314,15 +314,15 @@ void XPanelWindow::updateDimensions(bool propagate) {
314314 }
315315
316316 if (this ->mAnchors .verticalConstraint ()) {
317- geometry.setY (screenGeometry.y () + this ->mMargins .mTop );
318- geometry.setHeight (screenGeometry.height () - this ->mMargins .mTop - this ->mMargins .mBottom );
317+ geometry.setY (screenGeometry.y () + this ->mMargins .top );
318+ geometry.setHeight (screenGeometry.height () - this ->mMargins .top - this ->mMargins .bottom );
319319 } else {
320320 if (this ->mAnchors .mTop ) {
321- geometry.setY (screenGeometry.y () + this ->mMargins .mTop );
321+ geometry.setY (screenGeometry.y () + this ->mMargins .top );
322322 } else if (this ->mAnchors .mBottom ) {
323323 geometry.setY (
324324 screenGeometry.y () + screenGeometry.height () - this ->implicitHeight ()
325- - this ->mMargins .mBottom
325+ - this ->mMargins .bottom
326326 );
327327 } else {
328328 geometry.setY (screenGeometry.y () + screenGeometry.height () / 2 - this ->implicitHeight () / 2 );
@@ -377,10 +377,10 @@ void XPanelWindow::getExclusion(int& side, quint32& exclusiveZone) {
377377 if (autoExclude) {
378378 if (side == 0 || side == 1 ) {
379379 exclusiveZone =
380- this ->implicitWidth () + (side == 0 ? this ->mMargins .mLeft : this ->mMargins .mRight );
380+ this ->implicitWidth () + (side == 0 ? this ->mMargins .left : this ->mMargins .right );
381381 } else {
382382 exclusiveZone =
383- this ->implicitHeight () + (side == 2 ? this ->mMargins .mTop : this ->mMargins .mBottom );
383+ this ->implicitHeight () + (side == 2 ? this ->mMargins .top : this ->mMargins .bottom );
384384 }
385385 } else {
386386 exclusiveZone = this ->mExclusiveZone ;
0 commit comments