summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/toolbar/toolbar.cpp16
-rw-r--r--src/client/toolbar/toolbar.h3
2 files changed, 10 insertions, 9 deletions
diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp
index af885fd..0769f57 100644
--- a/src/client/toolbar/toolbar.cpp
+++ b/src/client/toolbar/toolbar.cpp
@@ -448,7 +448,7 @@ void Toolbar::hideBar()
if (--_hideCountdown > 0)
return;
_hideTimer.stop();
- move(x(), yPosHidden);
+ move(x(), _yPosHidden);
}
void Toolbar::delayedHideBar()
@@ -465,7 +465,7 @@ void Toolbar::delayedHideBar()
*/
void Toolbar::showBar()
{
- move(x(), yPos);
+ move(x(), _yPos);
delayedHideBar();
}
@@ -551,18 +551,18 @@ void Toolbar::setToolbarPosition(const QRect &availableGeometry)
{
const QRect primaryScreen = QGuiApplication::primaryScreen()->geometry();
// set center position
- centerPos = primaryScreen.left() + (primaryScreen.width() - this->width()) / 2;
+ const int centerPos = primaryScreen.left() + (primaryScreen.width() - this->width()) / 2;
// detect system task bars
if (primaryScreen.height() > availableGeometry.height() && primaryScreen.y() < availableGeometry.y()) {
// system task bar already in top position, prefer to show toolbar on bottom
- yPos = primaryScreen.height() - this->height();
- yPosHidden = primaryScreen.height() - 2;
+ _yPos = primaryScreen.height() - this->height();
+ _yPosHidden = primaryScreen.height() - 2;
} else {
// no task bars at all or a bottom task bar, either way show our toolbar on top
- yPos = primaryScreen.top();
- yPosHidden = yPos - this->height() + 2;
+ _yPos = primaryScreen.top();
+ _yPosHidden = _yPos - this->height() + 2;
}
- move(centerPos, yPos);
+ move(centerPos, _yPos);
delayedShowBar();
}
diff --git a/src/client/toolbar/toolbar.h b/src/client/toolbar/toolbar.h
index 7826499..67e9347 100644
--- a/src/client/toolbar/toolbar.h
+++ b/src/client/toolbar/toolbar.h
@@ -59,7 +59,8 @@ private:
const QPixmap _cam32, _beWatchedEye;
QPoint _lastDragPos;
- int centerPos, yPos, yPosHidden;
+ int _yPos;
+ int _yPosHidden;
void enterEvent(QEvent* e) override;
void mousePressEvent(QMouseEvent* event) override;