diff --git a/include/StellarX/Button.h b/include/StellarX/Button.h index 649e385..906748f 100644 --- a/include/StellarX/Button.h +++ b/include/StellarX/Button.h @@ -154,10 +154,6 @@ public: COLORREF getButtonTextColor() const; //获取按钮文字样式 StellarX::ControlText getButtonTextStyle() const; - //获取按钮宽度 - int getButtonWidth() const; - //获取按钮高度 - int getButtonHeight() const; public: // === Tooltip API=== //设置是否启用提示框 diff --git a/src/Button.cpp b/src/Button.cpp index 723c2ba..c45fe14 100644 --- a/src/Button.cpp +++ b/src/Button.cpp @@ -620,16 +620,6 @@ StellarX::ControlText Button::getButtonTextStyle() const return this->textStyle; } -int Button::getButtonWidth() const -{ - return this->width; -} - -int Button::getButtonHeight() const -{ - return this->height; -} - bool Button::isMouseInCircle(int mouseX, int mouseY, int x, int y, int radius) { double dis = sqrt(pow(mouseX - x, 2) + pow(mouseY - y, 2)); diff --git a/src/Dialog.cpp b/src/Dialog.cpp index b52f3dd..7e1e2f5 100644 --- a/src/Dialog.cpp +++ b/src/Dialog.cpp @@ -295,7 +295,7 @@ void Dialog::initButtons() this->Close(); }); auto cancelButton = createDialogButton( - (okButton.get()->getX() + okButton.get()->getButtonWidth() + buttonMargin), + (okButton.get()->getX() + okButton.get()->getWidth() + buttonMargin), okButton.get()->getY(), "取消" ); @@ -326,7 +326,7 @@ void Dialog::initButtons() this->Close(); }); auto noButton = createDialogButton( - (yesButton.get()->getX() + yesButton.get()->getButtonWidth() + buttonMargin), + (yesButton.get()->getX() + yesButton.get()->getWidth() + buttonMargin), yesButton.get()->getY(), "否" ); @@ -357,7 +357,7 @@ void Dialog::initButtons() this->Close(); }); auto noButton = createDialogButton( - yesButton.get()->getX() + yesButton.get()->getButtonWidth() + buttonMargin, + yesButton.get()->getX() + yesButton.get()->getWidth() + buttonMargin, yesButton.get()->getY(), "否" ); @@ -368,7 +368,7 @@ void Dialog::initButtons() this->Close(); }); auto cancelButton = createDialogButton( - noButton.get()->getX() + noButton.get()->getButtonWidth() + buttonMargin, + noButton.get()->getX() + noButton.get()->getWidth() + buttonMargin, noButton.get()->getY(), "取消" ); @@ -401,7 +401,7 @@ void Dialog::initButtons() this->Close(); }); auto cancelButton = createDialogButton( - retryButton.get()->getX() + retryButton.get()->getButtonWidth() + buttonMargin, + retryButton.get()->getX() + retryButton.get()->getWidth() + buttonMargin, retryButton.get()->getY(), "取消" ); @@ -432,7 +432,7 @@ void Dialog::initButtons() this->Close(); }); auto retryButton = createDialogButton( - abortButton.get()->getX() + abortButton.get()->getButtonWidth() + buttonMargin, + abortButton.get()->getX() + abortButton.get()->getWidth() + buttonMargin, abortButton.get()->getY(), "重试" ); @@ -443,7 +443,7 @@ void Dialog::initButtons() this->Close(); }); auto ignoreButton = createDialogButton( - retryButton.get()->getX() + retryButton.get()->getButtonWidth() + buttonMargin, + retryButton.get()->getX() + retryButton.get()->getWidth() + buttonMargin, retryButton.get()->getY(), "忽略" );