Skip to content

Commit

Permalink
chore: correct typos
Browse files Browse the repository at this point in the history
  • Loading branch information
felixonmars authored and zccrs committed May 7, 2019
1 parent 15c4d64 commit 07eab80
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/widgets/dborderlesswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion src/widgets/dborderlesswidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/dtitlebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
/*!
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/dtitlebar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 07eab80

Please sign in to comment.