mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Add parentheses around conditionals for clarity
This commit is contained in:
parent
24350761ac
commit
87c10e70cd
1 changed files with 3 additions and 3 deletions
|
@ -116,15 +116,15 @@ void FramelessDialog::resizeAndPosition(bool resizeParent) {
|
|||
void FramelessDialog::mousePressEvent(QMouseEvent* mouseEvent) {
|
||||
if (mouseEvent->button() == Qt::LeftButton) {
|
||||
if (_position == POSITION_LEFT || _position == POSITION_RIGHT) {
|
||||
bool hitLeft = _position == POSITION_LEFT && abs(mouseEvent->pos().x() - size().width()) < RESIZE_HANDLE_WIDTH;
|
||||
bool hitRight = _position == POSITION_RIGHT && mouseEvent->pos().x() < RESIZE_HANDLE_WIDTH;
|
||||
bool hitLeft = (_position == POSITION_LEFT) && (abs(mouseEvent->pos().x() - size().width()) < RESIZE_HANDLE_WIDTH);
|
||||
bool hitRight = (_position == POSITION_RIGHT) && (mouseEvent->pos().x() < RESIZE_HANDLE_WIDTH);
|
||||
if (hitLeft || hitRight) {
|
||||
_isResizing = true;
|
||||
_resizeInitialWidth = size().width();
|
||||
QApplication::setOverrideCursor(Qt::SizeHorCursor);
|
||||
}
|
||||
} else {
|
||||
bool hitTop = _position == POSITION_TOP && abs(mouseEvent->pos().y() - size().height()) < RESIZE_HANDLE_WIDTH;
|
||||
bool hitTop = (_position == POSITION_TOP) && (abs(mouseEvent->pos().y() - size().height()) < RESIZE_HANDLE_WIDTH);
|
||||
if (hitTop) {
|
||||
_isResizing = true;
|
||||
_resizeInitialWidth = size().height();
|
||||
|
|
Loading…
Reference in a new issue