Skip to content

Commit

Permalink
Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"
Browse files Browse the repository at this point in the history
I hereby declare these to be full nouns that we don't split,
neither by space, nor by underscore:

- Breadcrumbbar
- Coolbar
- Menubar
- Progressbar
- Scrollbar
- Statusbar
- Taskbar
- Toolbar

This patch makes everything consistent by replacing every other variant
of these with the proper one. :^)
  • Loading branch information
awesomekling committed Apr 13, 2021
1 parent 86bdfa1 commit a2baab3
Show file tree
Hide file tree
Showing 141 changed files with 518 additions and 518 deletions.
2 changes: 1 addition & 1 deletion Base/home/anon/Source/little/test.frm
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"Form1","widgets":[{"enabled":true,"forecolor":"#000000ff","ruler_visible":false,"autofill":false,"x":155,"tooltip":null,"height":121,"width":126,"y":10,"class":"GTextEditor","text":"Hi","backcolor":"#c0c0c0ff","visible":true},{"tooltip":null,"backcolor":"#c0c0c0ff","forecolor":"#000000ff","text":"Okydoky","class":"GButton","autofill":false,"enabled":true,"visible":true,"x":10,"height":21,"y":70,"width":81},{"tooltip":null,"backcolor":"#c0c0c0ff","forecolor":"#000000ff","class":"GGroupBox","autofill":true,"enabled":true,"visible":true,"title":"groupie","x":10,"height":71,"y":100,"width":141},{"tooltip":null,"forecolor":"#000000ff","y":10,"max":100,"autofill":false,"x":10,"min":0,"class":"GProgressBar","backcolor":"#c0c0c0ff","height":21,"enabled":true,"visible":true,"width":136,"value":50},{"tooltip":null,"backcolor":"#c0c0c0ff","forecolor":"#000000ff","text":"Looks like success!","class":"GLabel","autofill":true,"enabled":true,"visible":true,"x":10,"height":26,"y":35,"width":136},{"enabled":true,"forecolor":"#000000ff","checked":false,"autofill":false,"x":160,"tooltip":null,"height":26,"width":91,"y":140,"class":"GCheckBox","text":"checkbox_1","backcolor":"#c0c0c0ff","visible":true},{"enabled":true,"forecolor":"#000000ff","checked":false,"autofill":false,"x":160,"tooltip":null,"height":26,"width":61,"y":160,"class":"GRadioButton","text":"radio_1","backcolor":"#c0c0c0ff","visible":true},{"tooltip":null,"forecolor":"#000000ff","y":125,"max":100,"autofill":false,"x":25,"min":0,"class":"GSlider","backcolor":"#c0c0c0ff","height":26,"enabled":true,"visible":true,"width":116,"value":"60"}]}
{"name":"Form1","widgets":[{"enabled":true,"forecolor":"#000000ff","ruler_visible":false,"autofill":false,"x":155,"tooltip":null,"height":121,"width":126,"y":10,"class":"GTextEditor","text":"Hi","backcolor":"#c0c0c0ff","visible":true},{"tooltip":null,"backcolor":"#c0c0c0ff","forecolor":"#000000ff","text":"Okydoky","class":"GButton","autofill":false,"enabled":true,"visible":true,"x":10,"height":21,"y":70,"width":81},{"tooltip":null,"backcolor":"#c0c0c0ff","forecolor":"#000000ff","class":"GGroupBox","autofill":true,"enabled":true,"visible":true,"title":"groupie","x":10,"height":71,"y":100,"width":141},{"tooltip":null,"forecolor":"#000000ff","y":10,"max":100,"autofill":false,"x":10,"min":0,"class":"GProgressbar","backcolor":"#c0c0c0ff","height":21,"enabled":true,"visible":true,"width":136,"value":50},{"tooltip":null,"backcolor":"#c0c0c0ff","forecolor":"#000000ff","text":"Looks like success!","class":"GLabel","autofill":true,"enabled":true,"visible":true,"x":10,"height":26,"y":35,"width":136},{"enabled":true,"forecolor":"#000000ff","checked":false,"autofill":false,"x":160,"tooltip":null,"height":26,"width":91,"y":140,"class":"GCheckBox","text":"checkbox_1","backcolor":"#c0c0c0ff","visible":true},{"enabled":true,"forecolor":"#000000ff","checked":false,"autofill":false,"x":160,"tooltip":null,"height":26,"width":61,"y":160,"class":"GRadioButton","text":"radio_1","backcolor":"#c0c0c0ff","visible":true},{"tooltip":null,"forecolor":"#000000ff","y":125,"max":100,"autofill":false,"x":25,"min":0,"class":"GSlider","backcolor":"#c0c0c0ff","height":26,"enabled":true,"visible":true,"width":116,"value":"60"}]}
4 changes: 2 additions & 2 deletions Userland/Applications/Browser/BookmarksBarWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ BookmarksBarWidget::BookmarksBarWidget(const String& bookmarks_file, bool enable
set_visible(false);

m_additional = GUI::Button::construct();
m_additional->set_button_style(Gfx::ButtonStyle::CoolBar);
m_additional->set_button_style(Gfx::ButtonStyle::Coolbar);
m_additional->set_text(">");
m_additional->set_fixed_size(14, 20);
m_additional->set_focus_policy(GUI::FocusPolicy::TabFocus);
Expand Down Expand Up @@ -208,7 +208,7 @@ void BookmarksBarWidget::model_did_update(unsigned)
auto& button = add<GUI::Button>();
m_bookmarks.append(button);

button.set_button_style(Gfx::ButtonStyle::CoolBar);
button.set_button_style(Gfx::ButtonStyle::Coolbar);
button.set_text(title);
button.set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-html.png"));
button.set_fixed_size(font().width(title) + 32, 20);
Expand Down
14 changes: 7 additions & 7 deletions Userland/Applications/Browser/DownloadWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <LibGUI/ImageWidget.h>
#include <LibGUI/Label.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/ProgressBar.h>
#include <LibGUI/Progressbar.h>
#include <LibGUI/Window.h>
#include <LibProtocol/Client.h>
#include <LibWeb/Loader/ResourceLoader.h>
Expand Down Expand Up @@ -91,8 +91,8 @@ DownloadWidget::DownloadWidget(const URL& url)
source_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
source_label.set_fixed_height(16);

m_progress_bar = add<GUI::ProgressBar>();
m_progress_bar->set_fixed_height(20);
m_progressbar = add<GUI::Progressbar>();
m_progressbar->set_fixed_height(20);

m_progress_label = add<GUI::Label>();
m_progress_label->set_text_alignment(Gfx::TextAlignment::CenterLeft);
Expand Down Expand Up @@ -127,15 +127,15 @@ DownloadWidget::~DownloadWidget()

void DownloadWidget::did_progress(Optional<u32> total_size, u32 downloaded_size)
{
m_progress_bar->set_min(0);
m_progressbar->set_min(0);
if (total_size.has_value()) {
int percent = roundf(((float)downloaded_size / (float)total_size.value()) * 100.0f);
window()->set_progress(percent);
m_progress_bar->set_max(total_size.value());
m_progressbar->set_max(total_size.value());
} else {
m_progress_bar->set_max(0);
m_progressbar->set_max(0);
}
m_progress_bar->set_value(downloaded_size);
m_progressbar->set_value(downloaded_size);

{
StringBuilder builder;
Expand Down
4 changes: 2 additions & 2 deletions Userland/Applications/Browser/DownloadWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <AK/URL.h>
#include <LibCore/ElapsedTimer.h>
#include <LibCore/FileStream.h>
#include <LibGUI/ProgressBar.h>
#include <LibGUI/Progressbar.h>
#include <LibGUI/Widget.h>
#include <LibProtocol/Download.h>

Expand All @@ -50,7 +50,7 @@ class DownloadWidget final : public GUI::Widget {
URL m_url;
String m_destination_path;
RefPtr<Protocol::Download> m_download;
RefPtr<GUI::ProgressBar> m_progress_bar;
RefPtr<GUI::Progressbar> m_progressbar;
RefPtr<GUI::Label> m_progress_label;
RefPtr<GUI::Button> m_cancel_button;
RefPtr<GUI::Button> m_close_button;
Expand Down
18 changes: 9 additions & 9 deletions Userland/Applications/Browser/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
#include <LibGUI/Button.h>
#include <LibGUI/Clipboard.h>
#include <LibGUI/Menu.h>
#include <LibGUI/MenuBar.h>
#include <LibGUI/StatusBar.h>
#include <LibGUI/Menubar.h>
#include <LibGUI/Statusbar.h>
#include <LibGUI/TabWidget.h>
#include <LibGUI/TextBox.h>
#include <LibGUI/ToolBar.h>
#include <LibGUI/ToolBarContainer.h>
#include <LibGUI/Toolbar.h>
#include <LibGUI/ToolbarContainer.h>
#include <LibGUI/Window.h>
#include <LibJS/Interpreter.h>
#include <LibWeb/Dump.h>
Expand Down Expand Up @@ -99,8 +99,8 @@ Tab::Tab(Type type)
{
load_from_gml(tab_gml);

m_toolbar_container = *find_descendant_of_type_named<GUI::ToolBarContainer>("toolbar_container");
auto& toolbar = *find_descendant_of_type_named<GUI::ToolBar>("toolbar");
m_toolbar_container = *find_descendant_of_type_named<GUI::ToolbarContainer>("toolbar_container");
auto& toolbar = *find_descendant_of_type_named<GUI::Toolbar>("toolbar");

auto& webview_container = *find_descendant_of_type_named<GUI::Widget>("webview_container");

Expand Down Expand Up @@ -136,7 +136,7 @@ Tab::Tab(Type type)
}));

m_bookmark_button = toolbar.add<GUI::Button>();
m_bookmark_button->set_button_style(Gfx::ButtonStyle::CoolBar);
m_bookmark_button->set_button_style(Gfx::ButtonStyle::Coolbar);
m_bookmark_button->set_focus_policy(GUI::FocusPolicy::TabFocus);
m_bookmark_button->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/bookmark-contour.png"));
m_bookmark_button->set_fixed_size(22, 22);
Expand Down Expand Up @@ -280,7 +280,7 @@ Tab::Tab(Type type)
},
this);

m_statusbar = *find_descendant_of_type_named<GUI::StatusBar>("statusbar");
m_statusbar = *find_descendant_of_type_named<GUI::Statusbar>("statusbar");

hooks().on_link_hover = [this](auto& url) {
if (url.is_valid())
Expand All @@ -293,7 +293,7 @@ Tab::Tab(Type type)
load(url);
};

m_menubar = GUI::MenuBar::construct();
m_menubar = GUI::Menubar::construct();

auto& app_menu = m_menubar->add_menu("&File");
app_menu.add_action(WindowActions::the().create_new_tab_action());
Expand Down
6 changes: 3 additions & 3 deletions Userland/Applications/Browser/Tab.gml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
layout: @GUI::VerticalBoxLayout {
}

@GUI::ToolBarContainer {
@GUI::ToolbarContainer {
name: "toolbar_container"

@GUI::ToolBar {
@GUI::Toolbar {
name: "toolbar"
}
}
Expand All @@ -16,7 +16,7 @@
}
}

@GUI::StatusBar {
@GUI::Statusbar {
name: "statusbar"
}
}
6 changes: 3 additions & 3 deletions Userland/Applications/Browser/Tab.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ class Tab final : public GUI::Widget {
RefPtr<GUI::Button> m_bookmark_button;
RefPtr<GUI::Window> m_dom_inspector_window;
RefPtr<GUI::Window> m_console_window;
RefPtr<GUI::StatusBar> m_statusbar;
RefPtr<GUI::MenuBar> m_menubar;
RefPtr<GUI::ToolBarContainer> m_toolbar_container;
RefPtr<GUI::Statusbar> m_statusbar;
RefPtr<GUI::Menubar> m_menubar;
RefPtr<GUI::ToolbarContainer> m_toolbar_container;

RefPtr<GUI::Menu> m_link_context_menu;
RefPtr<GUI::Action> m_link_context_menu_default_action;
Expand Down
4 changes: 2 additions & 2 deletions Userland/Applications/Calculator/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <LibGUI/Clipboard.h>
#include <LibGUI/Icon.h>
#include <LibGUI/Menu.h>
#include <LibGUI/MenuBar.h>
#include <LibGUI/Menubar.h>
#include <LibGUI/Window.h>
#include <LibGfx/Bitmap.h>
#include <stdio.h>
Expand Down Expand Up @@ -69,7 +69,7 @@ int main(int argc, char** argv)
window->show();
window->set_icon(app_icon.bitmap_for_size(16));

auto menubar = GUI::MenuBar::construct();
auto menubar = GUI::Menubar::construct();

auto& app_menu = menubar->add_menu("&File");
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
Expand Down
4 changes: 2 additions & 2 deletions Userland/Applications/Calendar/CalendarWindow.gml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
layout: @GUI::VerticalBoxLayout {
}

@GUI::ToolBarContainer {
@GUI::ToolbarContainer {
name: "toolbar_container"

@GUI::ToolBar {
@GUI::Toolbar {
name: "toolbar"
}
}
Expand Down
10 changes: 5 additions & 5 deletions Userland/Applications/Calendar/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
#include <LibGUI/Calendar.h>
#include <LibGUI/Icon.h>
#include <LibGUI/Menu.h>
#include <LibGUI/MenuBar.h>
#include <LibGUI/ToolBar.h>
#include <LibGUI/ToolBarContainer.h>
#include <LibGUI/Menubar.h>
#include <LibGUI/Toolbar.h>
#include <LibGUI/ToolbarContainer.h>
#include <LibGUI/Window.h>
#include <unistd.h>

Expand Down Expand Up @@ -71,7 +71,7 @@ int main(int argc, char** argv)
auto& main_widget = window->set_main_widget<GUI::Widget>();
main_widget.load_from_gml(calendar_window_gml);

auto toolbar = main_widget.find_descendant_of_type_named<GUI::ToolBar>("toolbar");
auto toolbar = main_widget.find_descendant_of_type_named<GUI::Toolbar>("toolbar");
auto calendar = main_widget.find_descendant_of_type_named<GUI::Calendar>("calendar");

auto prev_date_action = GUI::Action::create({}, Gfx::Bitmap::load_from_file("/res/icons/16x16/go-back.png"), [&](const GUI::Action&) {
Expand Down Expand Up @@ -146,7 +146,7 @@ int main(int argc, char** argv)
view_month_action->set_checked(true);
};

auto menubar = GUI::MenuBar::construct();
auto menubar = GUI::Menubar::construct();
auto& app_menu = menubar->add_menu("&File");
app_menu.add_action(GUI::Action::create("&Add Event", { Mod_Ctrl | Mod_Shift, Key_E }, Gfx::Bitmap::load_from_file("/res/icons/16x16/add-event.png"),
[&](const GUI::Action&) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@GUI::Button {
name: "wallpaper_open_button"
tooltip: "Select wallpaper from file system."
button_style: "CoolBar"
button_style: "Coolbar"
fixed_width: 22
fixed_height: 22
}
Expand Down
4 changes: 2 additions & 2 deletions Userland/Applications/DisplaySettings/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <LibGUI/BoxLayout.h>
#include <LibGUI/Icon.h>
#include <LibGUI/Menu.h>
#include <LibGUI/MenuBar.h>
#include <LibGUI/Menubar.h>
#include <LibGUI/TabWidget.h>
#include <LibGUI/Window.h>
#include <LibGfx/Bitmap.h>
Expand Down Expand Up @@ -66,7 +66,7 @@ int main(int argc, char** argv)
window->set_main_widget(tab_widget.ptr());
window->set_icon(app_icon.bitmap_for_size(16));

auto menubar = GUI::MenuBar::construct();
auto menubar = GUI::Menubar::construct();

auto& app_menu = menubar->add_menu("File");
app_menu.add_action(GUI::CommonActions::make_quit_action([&](const GUI::Action&) {
Expand Down
16 changes: 8 additions & 8 deletions Userland/Applications/FileManager/FileManagerWindow.gml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
spacing: 2
}

@GUI::ToolBarContainer {
@GUI::ToolbarContainer {
name: "toolbar_container"
@GUI::ToolBar {
@GUI::Toolbar {
name: "main_toolbar"
}
@GUI::ToolBar {
@GUI::Toolbar {
name: "location_toolbar"
visible: false

Expand All @@ -23,16 +23,16 @@
fixed_height: 22
}
}
@GUI::ToolBar {
@GUI::Toolbar {
name: "breadcrumb_toolbar"

@GUI::Label {
text: "Location: "
autosize: true
}

@GUI::BreadcrumbBar {
name: "breadcrumb_bar"
@GUI::Breadcrumbbar {
name: "breadcrumbbar"
}
}
}
Expand All @@ -47,10 +47,10 @@

}

@GUI::StatusBar {
@GUI::Statusbar {
name: "statusbar"

@GUI::ProgressBar {
@GUI::Progressbar {
name: "progressbar"
text: "Generating thumbnails: "
visible: false
Expand Down
8 changes: 4 additions & 4 deletions Userland/Applications/FileManager/FileOperationProgress.gml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
}
}

@GUI::ProgressBar {
@GUI::Progressbar {
fixed_height: 22
name: "current_file_progress_bar"
name: "current_file_progressbar"
min: 0
}

Expand All @@ -62,9 +62,9 @@
}
}

@GUI::ProgressBar {
@GUI::Progressbar {
fixed_height: 22
name: "overall_progress_bar"
name: "overall_progressbar"
min: 0
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <LibGUI/Button.h>
#include <LibGUI/Label.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/ProgressBar.h>
#include <LibGUI/Progressbar.h>
#include <LibGUI/Window.h>

namespace FileManager {
Expand Down Expand Up @@ -99,17 +99,17 @@ void FileOperationProgressWidget::did_error()
void FileOperationProgressWidget::did_progress([[maybe_unused]] off_t bytes_done, [[maybe_unused]] off_t total_byte_count, size_t files_done, size_t total_file_count, off_t current_file_done, off_t current_file_size, const StringView& current_file_name)
{
auto& current_file_label = *find_descendant_of_type_named<GUI::Label>("current_file_label");
auto& current_file_progress_bar = *find_descendant_of_type_named<GUI::ProgressBar>("current_file_progress_bar");
auto& current_file_progressbar = *find_descendant_of_type_named<GUI::Progressbar>("current_file_progressbar");
auto& overall_progress_label = *find_descendant_of_type_named<GUI::Label>("overall_progress_label");
auto& overall_progress_bar = *find_descendant_of_type_named<GUI::ProgressBar>("overall_progress_bar");
auto& overall_progressbar = *find_descendant_of_type_named<GUI::Progressbar>("overall_progressbar");

current_file_label.set_text(current_file_name);
current_file_progress_bar.set_max(current_file_size);
current_file_progress_bar.set_value(current_file_done);
current_file_progressbar.set_max(current_file_size);
current_file_progressbar.set_value(current_file_done);

overall_progress_label.set_text(String::formatted("{} of {}", files_done, total_file_count));
overall_progress_bar.set_max(total_file_count);
overall_progress_bar.set_value(files_done);
overall_progressbar.set_max(total_file_count);
overall_progressbar.set_value(files_done);
}

void FileOperationProgressWidget::close_pipe()
Expand Down
Loading

0 comments on commit a2baab3

Please sign in to comment.