diff --git a/src/widgets/dborderlesswidget.cpp b/src/widgets/dborderlesswidget.cpp index 6bd1baeb6..9273e03ca 100644 --- a/src/widgets/dborderlesswidget.cpp +++ b/src/widgets/dborderlesswidget.cpp @@ -48,7 +48,7 @@ const int WindowHandleWidth = 10; const QColor BorderColor = QColor(0, 0, 0, 60); const QColor BackgroundTopColor = QColor(255, 255, 255); -const QColor BackgroundBottonColor = QColor(255, 255, 255); +const QColor BackgroundButtonColor = QColor(255, 255, 255); const QColor TipsBorderColor = QColor(255, 255, 255, 255 * 0.2); const QColor TipsBackground = QColor(0, 0, 0); @@ -253,12 +253,12 @@ DBorderlessWidget::DBorderlessWidget(DBorderlessWidgetPrivate &dd, QWidget *pare #endif #ifdef DTK_TITLE_DRAG_WINDOW connect(d->titlebar, &DTitlebar::mousePosMoving, - this, [ = ](Qt::MouseButton /*botton*/, QPoint pos) { + this, [ = ](Qt::MouseButton /*button*/, QPoint pos) { move(pos - d->m_LastMousePos); }); connect(d->titlebar, &DTitlebar::mousePosPressed, - this, [ = ](Qt::MouseButtons /*botton*/, QPoint pos) { + this, [ = ](Qt::MouseButtons /*button*/, QPoint pos) { // TODO: fix margin pos.setY(pos.y() - 10); d->m_LastMousePos = pos - this->mapToParent(this->pos()); @@ -424,12 +424,12 @@ void DBorderlessWidget::showFullScreen() /*! * \~chinese @brief 移动窗口 - * \~chinese @param botton 接收Qt::MouseButton枚举值 + * \~chinese @param button 接收Qt::MouseButton枚举值 */ -void DBorderlessWidget::moveWindow(Qt::MouseButton botton) +void DBorderlessWidget::moveWindow(Qt::MouseButton button) { #ifdef Q_OS_LINUX - XUtils::MoveWindow(this, botton); + XUtils::MoveWindow(this, button); #endif } diff --git a/src/widgets/dborderlesswidget.h b/src/widgets/dborderlesswidget.h index d2664cacc..f65cf78b8 100644 --- a/src/widgets/dborderlesswidget.h +++ b/src/widgets/dborderlesswidget.h @@ -155,7 +155,7 @@ public Q_SLOTS: void showFullScreen(); void showNormal(); - void moveWindow(Qt::MouseButton botton); + void moveWindow(Qt::MouseButton button); void toggleMaximizedWindow(); void setBackgroundColor(QColor backgroundColor); diff --git a/src/widgets/dtitlebar.cpp b/src/widgets/dtitlebar.cpp index f07954ab4..b0a2e234e 100644 --- a/src/widgets/dtitlebar.cpp +++ b/src/widgets/dtitlebar.cpp @@ -532,7 +532,7 @@ void DTitlebarPrivate::_q_quitActionTriggered() /*! - * \~english @brief DTitlebar::DTitlebar create an default widget with icon/title/and bottons + * \~english @brief DTitlebar::DTitlebar create an default widget with icon/title/and buttons * @param parent */ /*! diff --git a/src/widgets/dtitlebar.h b/src/widgets/dtitlebar.h index 7abd28763..cb85dac40 100644 --- a/src/widgets/dtitlebar.h +++ b/src/widgets/dtitlebar.h @@ -66,11 +66,11 @@ class LIBDTKWIDGETSHARED_EXPORT DTitlebar : public QFrame, public DTK_CORE_NAMES void optionClicked(); void doubleClicked(); void mousePressed(Qt::MouseButtons buttons); - void mouseMoving(Qt::MouseButton botton); + void mouseMoving(Qt::MouseButton button); #ifdef DTK_TITLE_DRAG_WINDOW void mousePosPressed(Qt::MouseButtons buttons, QPoint pos); - void mousePosMoving(Qt::MouseButton botton, QPoint pos); + void mousePosMoving(Qt::MouseButton button, QPoint pos); #endif public Q_SLOTS: