mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Welcome: Rename m_initial_tip_index=>m_tip_index
This commit is contained in:
parent
883abffa25
commit
4b8bae8151
Notes:
sideshowbarker
2024-07-17 00:59:44 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/4b8bae8151 Pull-request: https://github.com/SerenityOS/serenity/pull/17242
2 changed files with 7 additions and 7 deletions
|
@ -48,10 +48,10 @@ ErrorOr<void> WelcomeWidget::create_widgets()
|
|||
m_tip_frame->set_visible(true);
|
||||
if (m_tips.is_empty())
|
||||
return;
|
||||
m_initial_tip_index++;
|
||||
if (m_initial_tip_index >= m_tips.size())
|
||||
m_initial_tip_index = 0;
|
||||
m_tip_label->set_text(m_tips[m_initial_tip_index].to_deprecated_string());
|
||||
m_tip_index++;
|
||||
if (m_tip_index >= m_tips.size())
|
||||
m_tip_index = 0;
|
||||
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");
|
||||
|
@ -114,8 +114,8 @@ void WelcomeWidget::set_random_tip()
|
|||
if (m_tips.is_empty())
|
||||
return;
|
||||
|
||||
m_initial_tip_index = get_random_uniform(m_tips.size());
|
||||
m_tip_label->set_text(m_tips[m_initial_tip_index].to_deprecated_string());
|
||||
m_tip_index = get_random_uniform(m_tips.size());
|
||||
m_tip_label->set_text(m_tips[m_tip_index].to_deprecated_string());
|
||||
}
|
||||
|
||||
void WelcomeWidget::paint_event(GUI::PaintEvent& event)
|
||||
|
|
|
@ -38,6 +38,6 @@ private:
|
|||
RefPtr<GUI::CheckBox> m_startup_checkbox;
|
||||
RefPtr<WebView::OutOfProcessWebView> m_web_view;
|
||||
|
||||
size_t m_initial_tip_index { 0 };
|
||||
size_t m_tip_index { 0 };
|
||||
Vector<String> m_tips;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue