mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-03 21:54:05 +02:00
Added direct access to sections of discrete slider to derived classes.
This commit is contained in:
parent
146409844d
commit
63a8fe7ee8
2 changed files with 6 additions and 0 deletions
|
@ -68,6 +68,10 @@ void DiscreteSlider::setSelectOnPress(bool selectOnPress) {
|
|||
_selectOnPress = selectOnPress;
|
||||
}
|
||||
|
||||
std::vector<DiscreteSlider::Section> &DiscreteSlider::sectionsRef() {
|
||||
return _sections;
|
||||
}
|
||||
|
||||
void DiscreteSlider::addSection(const QString &label) {
|
||||
_sections.push_back(Section(label, getLabelStyle()));
|
||||
resizeToWidth(width());
|
||||
|
|
|
@ -97,6 +97,8 @@ protected:
|
|||
|
||||
void setSelectOnPress(bool selectOnPress);
|
||||
|
||||
std::vector<Section> §ionsRef();
|
||||
|
||||
private:
|
||||
void activateCallback();
|
||||
virtual const style::TextStyle &getLabelStyle() const = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue