Add full-text-width accessor for SettingsButton.
This commit is contained in:
parent
0c592310af
commit
9ab11ccb36
2 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue