diff options
author | Ken Moore <moorekou@gmail.com> | 2016-06-30 07:44:08 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-06-30 07:44:08 -0400 |
commit | c02fac06e23039e2a1097950adb3177a4d24203a (patch) | |
tree | 23ae0274d54a050b45faac104a21adfadc97cc62 /src-qt5/core/libLumina | |
parent | Tag version 1.0.0-Devel on the source tree (master branch) (diff) | |
parent | Create a directory for placing sample JSON menu generation scripts, and add o... (diff) | |
download | lumina-c02fac06e23039e2a1097950adb3177a4d24203a.tar.gz lumina-c02fac06e23039e2a1097950adb3177a4d24203a.tar.bz2 lumina-c02fac06e23039e2a1097950adb3177a4d24203a.zip |
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/core/libLumina')
-rw-r--r-- | src-qt5/core/libLumina/LuminaUtils.cpp | 18 | ||||
-rw-r--r-- | src-qt5/core/libLumina/themes/Glass.qss.template | 4 |
2 files changed, 16 insertions, 6 deletions
diff --git a/src-qt5/core/libLumina/LuminaUtils.cpp b/src-qt5/core/libLumina/LuminaUtils.cpp index bf90161d..1d0e186c 100644 --- a/src-qt5/core/libLumina/LuminaUtils.cpp +++ b/src-qt5/core/libLumina/LuminaUtils.cpp @@ -1008,30 +1008,35 @@ void ResizeMenu::mouseMoveEvent(QMouseEvent *ev){ // since the window will be moved again the next time it is shown // The "-2" in the sizing below accounts for the menu margins QPoint gpos = this->mapToGlobal(ev->pos()); + bool handled = false; switch(resizeSide){ case TOP: if(gpos.y() >= geom.bottom()-1){ break; } geom.setTop(gpos.y()); this->setGeometry(geom); - if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2)); } + if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2));} + handled = true; break; case BOTTOM: if(gpos.y() <= geom.top()+1){ break; } geom.setBottom( gpos.y()); this->setGeometry(geom); - if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2)); } + if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2));} + handled = true; break; case LEFT: if(gpos.x() >= geom.right()-1){ break; } geom.setLeft(gpos.x()); this->setGeometry(geom); - if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2)); } + if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2));} + handled = true; break; case RIGHT: if(gpos.x() <= geom.left()+1){ break; } geom.setRight(gpos.x()); this->setGeometry(geom); - if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2)); } + if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2));} + handled = true; break; default: //NONE //qDebug() << " - Mouse At:" << ev->pos(); @@ -1042,7 +1047,7 @@ void ResizeMenu::mouseMoveEvent(QMouseEvent *ev){ else if(ev->pos().y() >= this->height()-1 && ev->pos().y() <= this->height()+1){ this->setCursor(Qt::SizeVerCursor); } else{ this->setCursor(Qt::ArrowCursor); } } - QMenu::mouseMoveEvent(ev); //do normal processing as well + if(!handled){ QMenu::mouseMoveEvent(ev); } //do normal processing as well } void ResizeMenu::mousePressEvent(QMouseEvent *ev){ @@ -1054,11 +1059,12 @@ void ResizeMenu::mousePressEvent(QMouseEvent *ev){ else if(ev->pos().y()<=1 && ev->pos().y() >= -1){ resizeSide = TOP; used = true; } else if(ev->pos().y() >= this->height()-1 && ev->pos().y() <= this->height()+1){ resizeSide = BOTTOM; used = true; } } - if(used){ ev->accept(); } + if(used){ ev->accept(); this->grabMouse(); } else{ QMenu::mousePressEvent(ev); } //do normal processing } void ResizeMenu::mouseReleaseEvent(QMouseEvent *ev){ + this->releaseMouse(); if(ev->button() == Qt::LeftButton && resizeSide!=NONE ){ //qDebug() << "Mouse Release Event:" << ev->pos() << resizeSide; resizeSide = NONE; diff --git a/src-qt5/core/libLumina/themes/Glass.qss.template b/src-qt5/core/libLumina/themes/Glass.qss.template index f3c25ec4..827d8de4 100644 --- a/src-qt5/core/libLumina/themes/Glass.qss.template +++ b/src-qt5/core/libLumina/themes/Glass.qss.template @@ -473,6 +473,10 @@ QWidget#LuminaBootSplash{ border-radius: 5px; } +LDPlugin#applauncher{ + background-color: transparent; + border: none; +} LDPlugin#applauncher QToolButton, LDPlugin, LDPlugin#desktopview QListWidget::item{ background-color: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(234, 236, 243, 30), stop:1 rgba(229, 229, 229, 70)); border-width: 3px; |