mirror of https://github.com/procxx/kepka.git
Added ability to go to top of media panel by clicking on selected tab.
This commit is contained in:
parent
84e9e37353
commit
3fa3428b4b
|
@ -436,6 +436,7 @@ void StickersBox::switchTab() {
|
||||||
requestArchivedSets();
|
requestArchivedSets();
|
||||||
}
|
}
|
||||||
if (_tab == newTab) {
|
if (_tab == newTab) {
|
||||||
|
onScrollToY(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -782,6 +782,7 @@ void TabbedSelector::switchTab() {
|
||||||
Assert(tab >= 0 && tab < Tab::kCount);
|
Assert(tab >= 0 && tab < Tab::kCount);
|
||||||
auto newTabType = static_cast<SelectorTab>(tab);
|
auto newTabType = static_cast<SelectorTab>(tab);
|
||||||
if (_currentTabType == newTabType) {
|
if (_currentTabType == newTabType) {
|
||||||
|
_scroll->scrollToY(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,8 @@ DiscreteSlider::DiscreteSlider(QWidget *parent) : RpWidget(parent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiscreteSlider::setActiveSection(int index) {
|
void DiscreteSlider::setActiveSection(int index) {
|
||||||
if (_activeIndex != index) {
|
|
||||||
_activeIndex = index;
|
_activeIndex = index;
|
||||||
activateCallback();
|
activateCallback();
|
||||||
}
|
|
||||||
setSelectedSection(index);
|
setSelectedSection(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue