From 4b8bae81516539b9c8a2d8eafe7eeb2a6e038b80 Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Sun, 29 Jan 2023 09:59:11 -0500 Subject: [PATCH] Welcome: Rename m_initial_tip_index=>m_tip_index --- Userland/Applications/Welcome/WelcomeWidget.cpp | 12 ++++++------ Userland/Applications/Welcome/WelcomeWidget.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Userland/Applications/Welcome/WelcomeWidget.cpp b/Userland/Applications/Welcome/WelcomeWidget.cpp index c93177aefc8..4fef76b0340 100644 --- a/Userland/Applications/Welcome/WelcomeWidget.cpp +++ b/Userland/Applications/Welcome/WelcomeWidget.cpp @@ -48,10 +48,10 @@ ErrorOr 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("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) diff --git a/Userland/Applications/Welcome/WelcomeWidget.h b/Userland/Applications/Welcome/WelcomeWidget.h index 7f657d94bdf..744d60b28d5 100644 --- a/Userland/Applications/Welcome/WelcomeWidget.h +++ b/Userland/Applications/Welcome/WelcomeWidget.h @@ -38,6 +38,6 @@ private: RefPtr m_startup_checkbox; RefPtr m_web_view; - size_t m_initial_tip_index { 0 }; + size_t m_tip_index { 0 }; Vector m_tips; };