mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:07:45 +00:00
Welcome: Rename m_initial_tip_index=>m_tip_index
This commit is contained in:
parent
883abffa25
commit
4b8bae8151
2 changed files with 7 additions and 7 deletions
|
@ -48,10 +48,10 @@ ErrorOr<void> WelcomeWidget::create_widgets()
|
||||||
m_tip_frame->set_visible(true);
|
m_tip_frame->set_visible(true);
|
||||||
if (m_tips.is_empty())
|
if (m_tips.is_empty())
|
||||||
return;
|
return;
|
||||||
m_initial_tip_index++;
|
m_tip_index++;
|
||||||
if (m_initial_tip_index >= m_tips.size())
|
if (m_tip_index >= m_tips.size())
|
||||||
m_initial_tip_index = 0;
|
m_tip_index = 0;
|
||||||
m_tip_label->set_text(m_tips[m_initial_tip_index].to_deprecated_string());
|
m_tip_label->set_text(m_tips[m_tip_index].to_deprecated_string());
|
||||||
};
|
};
|
||||||
|
|
||||||
m_help_button = find_descendant_of_type_named<GUI::Button>("help_button");
|
m_help_button = find_descendant_of_type_named<GUI::Button>("help_button");
|
||||||
|
@ -114,8 +114,8 @@ void WelcomeWidget::set_random_tip()
|
||||||
if (m_tips.is_empty())
|
if (m_tips.is_empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_initial_tip_index = get_random_uniform(m_tips.size());
|
m_tip_index = get_random_uniform(m_tips.size());
|
||||||
m_tip_label->set_text(m_tips[m_initial_tip_index].to_deprecated_string());
|
m_tip_label->set_text(m_tips[m_tip_index].to_deprecated_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WelcomeWidget::paint_event(GUI::PaintEvent& event)
|
void WelcomeWidget::paint_event(GUI::PaintEvent& event)
|
||||||
|
|
|
@ -38,6 +38,6 @@ private:
|
||||||
RefPtr<GUI::CheckBox> m_startup_checkbox;
|
RefPtr<GUI::CheckBox> m_startup_checkbox;
|
||||||
RefPtr<WebView::OutOfProcessWebView> m_web_view;
|
RefPtr<WebView::OutOfProcessWebView> m_web_view;
|
||||||
|
|
||||||
size_t m_initial_tip_index { 0 };
|
size_t m_tip_index { 0 };
|
||||||
Vector<String> m_tips;
|
Vector<String> m_tips;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue