mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-09 02:50:06 -04:00
Minor clean
This commit is contained in:
@@ -79,8 +79,7 @@ bool TabBar::focus_tab(int index) {
|
||||
if (index < 0 || index >= mTabs.size() || index == mProps.selectedTabIndex) {
|
||||
return false;
|
||||
}
|
||||
const auto& tab = mTabs[index];
|
||||
return tab.button.focus();
|
||||
return mTabs[index].button.focus();
|
||||
}
|
||||
|
||||
int TabBar::tab_containing(Rml::Element* element) const {
|
||||
|
||||
@@ -29,11 +29,11 @@ public:
|
||||
void add_tab(const Rml::String& title, TabCallback callback);
|
||||
bool set_active_tab(int index);
|
||||
bool focus_tab(int index);
|
||||
int tab_containing(Rml::Element* element) const;
|
||||
int count() const { return mTabs.size(); }
|
||||
bool handle_nav_command(Rml::Event& event, NavCommand cmd);
|
||||
|
||||
private:
|
||||
int tab_containing(Rml::Element* element) const;
|
||||
|
||||
Props mProps;
|
||||
std::vector<Tab> mTabs;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user