/* * Copyright (c) 2018-2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include #include #include #include #include REGISTER_WIDGET(GUI, Statusbar) namespace GUI { Statusbar::Statusbar(int label_count) { set_fixed_height(18); set_layout(); layout()->set_margins({ 0, 0, 0, 0 }); layout()->set_spacing(2); if (label_count < 1) label_count = 1; for (auto i = 0; i < label_count; i++) { m_segments.append(Segment { .label = create_label(), .text = {}, .override_text = {}, }); } m_corner = add(); REGISTER_STRING_PROPERTY("text", text, set_text); } Statusbar::~Statusbar() { } NonnullRefPtr