Add full-text-width accessor for SettingsButton.

This commit is contained in:
John Preston 2022-10-14 11:58:30 +04:00
parent 0c592310af
commit 9ab11ccb36
2 changed files with 5 additions and 0 deletions

View file

@ -765,6 +765,10 @@ const style::SettingsButton &SettingsButton::st() const {
return _st;
}
int SettingsButton::fullTextWidth() const {
return _text.maxWidth();
}
void SettingsButton::paintEvent(QPaintEvent *e) {
Painter p(this);

View file

@ -274,6 +274,7 @@ public:
void setPaddingOverride(style::margins padding);
[[nodiscard]] const style::SettingsButton &st() const;
[[nodiscard]] int fullTextWidth() const;
protected:
int resizeGetHeight(int newWidth) override;