更正:重新上传删除Button::getButtonWidth/Height接口

This commit is contained in:
2026-01-11 13:33:05 +08:00
parent 10a91f9a64
commit 572802e2ee
3 changed files with 7 additions and 21 deletions
-4
View File
@@ -154,10 +154,6 @@ public:
COLORREF getButtonTextColor() const;
//获取按钮文字样式
StellarX::ControlText getButtonTextStyle() const;
//获取按钮宽度
int getButtonWidth() const;
//获取按钮高度
int getButtonHeight() const;
public:
// === Tooltip API===
//设置是否启用提示框
-10
View File
@@ -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));
+7 -7
View File
@@ -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(),
"忽略"
);