mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 06:02:07 +03:00
Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"
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. :^)
This commit is contained in:
parent
86bdfa1edf
commit
a2baab38fd
Notes:
sideshowbarker
2024-07-18 20:25:22 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a2baab38fd5
@ -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"}]}
|
||||
|
@ -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);
|
||||
@ -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);
|
||||
|
@ -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>
|
||||
@ -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);
|
||||
@ -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;
|
||||
|
@ -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>
|
||||
|
||||
@ -50,7 +50,7 @@ private:
|
||||
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;
|
||||
|
@ -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>
|
||||
@ -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");
|
||||
|
||||
@ -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);
|
||||
@ -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())
|
||||
@ -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());
|
||||
|
@ -2,10 +2,10 @@
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
}
|
||||
|
||||
@GUI::ToolBarContainer {
|
||||
@GUI::ToolbarContainer {
|
||||
name: "toolbar_container"
|
||||
|
||||
@GUI::ToolBar {
|
||||
@GUI::Toolbar {
|
||||
name: "toolbar"
|
||||
}
|
||||
}
|
||||
@ -16,7 +16,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::StatusBar {
|
||||
@GUI::Statusbar {
|
||||
name: "statusbar"
|
||||
}
|
||||
}
|
||||
|
@ -103,9 +103,9 @@ private:
|
||||
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;
|
||||
|
@ -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>
|
||||
@ -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&) {
|
||||
|
@ -3,10 +3,10 @@
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
}
|
||||
|
||||
@GUI::ToolBarContainer {
|
||||
@GUI::ToolbarContainer {
|
||||
name: "toolbar_container"
|
||||
|
||||
@GUI::ToolBar {
|
||||
@GUI::Toolbar {
|
||||
name: "toolbar"
|
||||
}
|
||||
}
|
||||
|
@ -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>
|
||||
|
||||
@ -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&) {
|
||||
@ -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&) {
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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>
|
||||
@ -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&) {
|
||||
|
@ -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
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
fixed_height: 22
|
||||
}
|
||||
}
|
||||
@GUI::ToolBar {
|
||||
@GUI::Toolbar {
|
||||
name: "breadcrumb_toolbar"
|
||||
|
||||
@GUI::Label {
|
||||
@ -31,8 +31,8 @@
|
||||
autosize: true
|
||||
}
|
||||
|
||||
@GUI::BreadcrumbBar {
|
||||
name: "breadcrumb_bar"
|
||||
@GUI::Breadcrumbbar {
|
||||
name: "breadcrumbbar"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -47,10 +47,10 @@
|
||||
|
||||
}
|
||||
|
||||
@GUI::StatusBar {
|
||||
@GUI::Statusbar {
|
||||
name: "statusbar"
|
||||
|
||||
@GUI::ProgressBar {
|
||||
@GUI::Progressbar {
|
||||
name: "progressbar"
|
||||
text: "Generating thumbnails: "
|
||||
visible: false
|
||||
|
@ -36,9 +36,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::ProgressBar {
|
||||
@GUI::Progressbar {
|
||||
fixed_height: 22
|
||||
name: "current_file_progress_bar"
|
||||
name: "current_file_progressbar"
|
||||
min: 0
|
||||
}
|
||||
|
||||
@ -62,9 +62,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::ProgressBar {
|
||||
@GUI::Progressbar {
|
||||
fixed_height: 22
|
||||
name: "overall_progress_bar"
|
||||
name: "overall_progressbar"
|
||||
min: 0
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
@ -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()
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
#include <LibGUI/BreadcrumbBar.h>
|
||||
#include <LibGUI/Breadcrumbbar.h>
|
||||
#include <LibGUI/Clipboard.h>
|
||||
#include <LibGUI/Desktop.h>
|
||||
#include <LibGUI/FileIconProvider.h>
|
||||
@ -50,15 +50,15 @@
|
||||
#include <LibGUI/InputBox.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ProgressBar.h>
|
||||
#include <LibGUI/Progressbar.h>
|
||||
#include <LibGUI/Splitter.h>
|
||||
#include <LibGUI/StatusBar.h>
|
||||
#include <LibGUI/Statusbar.h>
|
||||
#include <LibGUI/TextEditor.h>
|
||||
#include <LibGUI/ToolBar.h>
|
||||
#include <LibGUI/ToolBarContainer.h>
|
||||
#include <LibGUI/Toolbar.h>
|
||||
#include <LibGUI/ToolbarContainer.h>
|
||||
#include <LibGUI/TreeView.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibGUI/Window.h>
|
||||
@ -411,16 +411,16 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
||||
|
||||
widget.load_from_gml(file_manager_window_gml);
|
||||
|
||||
auto& toolbar_container = *widget.find_descendant_of_type_named<GUI::ToolBarContainer>("toolbar_container");
|
||||
auto& main_toolbar = *widget.find_descendant_of_type_named<GUI::ToolBar>("main_toolbar");
|
||||
auto& location_toolbar = *widget.find_descendant_of_type_named<GUI::ToolBar>("location_toolbar");
|
||||
auto& toolbar_container = *widget.find_descendant_of_type_named<GUI::ToolbarContainer>("toolbar_container");
|
||||
auto& main_toolbar = *widget.find_descendant_of_type_named<GUI::Toolbar>("main_toolbar");
|
||||
auto& location_toolbar = *widget.find_descendant_of_type_named<GUI::Toolbar>("location_toolbar");
|
||||
location_toolbar.layout()->set_margins({ 6, 3, 6, 3 });
|
||||
|
||||
auto& location_textbox = *widget.find_descendant_of_type_named<GUI::TextBox>("location_textbox");
|
||||
|
||||
auto& breadcrumb_toolbar = *widget.find_descendant_of_type_named<GUI::ToolBar>("breadcrumb_toolbar");
|
||||
auto& breadcrumb_toolbar = *widget.find_descendant_of_type_named<GUI::Toolbar>("breadcrumb_toolbar");
|
||||
breadcrumb_toolbar.layout()->set_margins({ 6, 0, 6, 0 });
|
||||
auto& breadcrumb_bar = *widget.find_descendant_of_type_named<GUI::BreadcrumbBar>("breadcrumb_bar");
|
||||
auto& breadcrumbbar = *widget.find_descendant_of_type_named<GUI::Breadcrumbbar>("breadcrumbbar");
|
||||
|
||||
auto& splitter = *widget.find_descendant_of_type_named<GUI::HorizontalSplitter>("splitter");
|
||||
auto& tree_view = *widget.find_descendant_of_type_named<GUI::TreeView>("tree_view");
|
||||
@ -446,10 +446,10 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
||||
// Open the root directory. FIXME: This is awkward.
|
||||
tree_view.toggle_index(directories_model->index(0, 0, {}));
|
||||
|
||||
auto& statusbar = *widget.find_descendant_of_type_named<GUI::StatusBar>("statusbar");
|
||||
auto& statusbar = *widget.find_descendant_of_type_named<GUI::Statusbar>("statusbar");
|
||||
|
||||
auto& progressbar = *widget.find_descendant_of_type_named<GUI::ProgressBar>("progressbar");
|
||||
progressbar.set_format(GUI::ProgressBar::Format::ValueSlashMax);
|
||||
auto& progressbar = *widget.find_descendant_of_type_named<GUI::Progressbar>("progressbar");
|
||||
progressbar.set_format(GUI::Progressbar::Format::ValueSlashMax);
|
||||
progressbar.set_frame_shape(Gfx::FrameShape::Panel);
|
||||
progressbar.set_frame_shadow(Gfx::FrameShadow::Sunken);
|
||||
progressbar.set_frame_thickness(1);
|
||||
@ -537,11 +537,11 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
||||
|
||||
layout_statusbar_action = GUI::Action::create_checkable("&Status Bar", [&](auto& action) {
|
||||
action.is_checked() ? statusbar.set_visible(true) : statusbar.set_visible(false);
|
||||
config->write_bool_entry("Layout", "ShowStatusBar", action.is_checked());
|
||||
config->write_bool_entry("Layout", "ShowStatusbar", action.is_checked());
|
||||
config->sync();
|
||||
});
|
||||
|
||||
auto show_statusbar = config->read_bool_entry("Layout", "ShowStatusBar", true);
|
||||
auto show_statusbar = config->read_bool_entry("Layout", "ShowStatusbar", true);
|
||||
layout_statusbar_action->set_checked(show_statusbar);
|
||||
statusbar.set_visible(show_statusbar);
|
||||
|
||||
@ -751,7 +751,7 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
||||
refresh_tree_view();
|
||||
});
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("&File");
|
||||
app_menu.add_action(mkdir_action);
|
||||
@ -845,20 +845,20 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
||||
{
|
||||
LexicalPath lexical_path(new_path);
|
||||
|
||||
auto segment_index_of_new_path_in_breadcrumb_bar = [&]() -> Optional<size_t> {
|
||||
for (size_t i = 0; i < breadcrumb_bar.segment_count(); ++i) {
|
||||
if (breadcrumb_bar.segment_data(i) == new_path)
|
||||
auto segment_index_of_new_path_in_breadcrumbbar = [&]() -> Optional<size_t> {
|
||||
for (size_t i = 0; i < breadcrumbbar.segment_count(); ++i) {
|
||||
if (breadcrumbbar.segment_data(i) == new_path)
|
||||
return i;
|
||||
}
|
||||
return {};
|
||||
}();
|
||||
|
||||
if (segment_index_of_new_path_in_breadcrumb_bar.has_value()) {
|
||||
breadcrumb_bar.set_selected_segment(segment_index_of_new_path_in_breadcrumb_bar.value());
|
||||
if (segment_index_of_new_path_in_breadcrumbbar.has_value()) {
|
||||
breadcrumbbar.set_selected_segment(segment_index_of_new_path_in_breadcrumbbar.value());
|
||||
} else {
|
||||
breadcrumb_bar.clear_segments();
|
||||
breadcrumbbar.clear_segments();
|
||||
|
||||
breadcrumb_bar.append_segment("/", GUI::FileIconProvider::icon_for_path("/").bitmap_for_size(16), "/", "/");
|
||||
breadcrumbbar.append_segment("/", GUI::FileIconProvider::icon_for_path("/").bitmap_for_size(16), "/", "/");
|
||||
StringBuilder builder;
|
||||
|
||||
for (auto& part : lexical_path.parts()) {
|
||||
@ -866,13 +866,13 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
||||
builder.append('/');
|
||||
builder.append(part);
|
||||
|
||||
breadcrumb_bar.append_segment(part, GUI::FileIconProvider::icon_for_path(builder.string_view()).bitmap_for_size(16), builder.string_view(), builder.string_view());
|
||||
breadcrumbbar.append_segment(part, GUI::FileIconProvider::icon_for_path(builder.string_view()).bitmap_for_size(16), builder.string_view(), builder.string_view());
|
||||
}
|
||||
|
||||
breadcrumb_bar.set_selected_segment(breadcrumb_bar.segment_count() - 1);
|
||||
breadcrumbbar.set_selected_segment(breadcrumbbar.segment_count() - 1);
|
||||
|
||||
breadcrumb_bar.on_segment_click = [&](size_t segment_index) {
|
||||
directory_view.open(breadcrumb_bar.segment_data(segment_index));
|
||||
breadcrumbbar.on_segment_click = [&](size_t segment_index) {
|
||||
directory_view.open(breadcrumbbar.segment_data(segment_index));
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -1045,18 +1045,18 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
||||
refresh_tree_view();
|
||||
};
|
||||
|
||||
breadcrumb_bar.on_segment_drop = [&](size_t segment_index, const GUI::DropEvent& event) {
|
||||
breadcrumbbar.on_segment_drop = [&](size_t segment_index, const GUI::DropEvent& event) {
|
||||
if (!event.mime_data().has_urls())
|
||||
return;
|
||||
copy_urls_to_directory(event.mime_data().urls(), breadcrumb_bar.segment_data(segment_index));
|
||||
copy_urls_to_directory(event.mime_data().urls(), breadcrumbbar.segment_data(segment_index));
|
||||
};
|
||||
|
||||
breadcrumb_bar.on_segment_drag_enter = [&](size_t, GUI::DragEvent& event) {
|
||||
breadcrumbbar.on_segment_drag_enter = [&](size_t, GUI::DragEvent& event) {
|
||||
if (event.mime_types().contains_slow("text/uri-list"))
|
||||
event.accept();
|
||||
};
|
||||
|
||||
breadcrumb_bar.on_doubleclick = [&](const GUI::MouseEvent&) {
|
||||
breadcrumbbar.on_doubleclick = [&](const GUI::MouseEvent&) {
|
||||
go_to_location_action->activate();
|
||||
};
|
||||
|
||||
|
@ -43,13 +43,13 @@
|
||||
#include <LibGUI/GroupBox.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/SpinBox.h>
|
||||
#include <LibGUI/StatusBar.h>
|
||||
#include <LibGUI/Statusbar.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGUI/ToolBarContainer.h>
|
||||
#include <LibGUI/ToolbarContainer.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/BitmapFont.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
@ -99,8 +99,8 @@ FontEditorWidget::FontEditorWidget(const String& path, RefPtr<Gfx::BitmapFont>&&
|
||||
{
|
||||
load_from_gml(font_editor_window_gml);
|
||||
|
||||
auto& toolbar = *find_descendant_of_type_named<GUI::ToolBar>("toolbar");
|
||||
auto& status_bar = *find_descendant_of_type_named<GUI::StatusBar>("status_bar");
|
||||
auto& toolbar = *find_descendant_of_type_named<GUI::Toolbar>("toolbar");
|
||||
auto& statusbar = *find_descendant_of_type_named<GUI::Statusbar>("statusbar");
|
||||
auto& glyph_map_container = *find_descendant_of_type_named<GUI::Widget>("glyph_map_container");
|
||||
m_glyph_editor_container = *find_descendant_of_type_named<GUI::Widget>("glyph_editor_container");
|
||||
m_left_column_container = *find_descendant_of_type_named<GUI::Widget>("left_column_container");
|
||||
@ -256,7 +256,7 @@ FontEditorWidget::FontEditorWidget(const String& path, RefPtr<Gfx::BitmapFont>&&
|
||||
}
|
||||
builder.append(") ");
|
||||
builder.appendff("[{}x{}]", m_edited_font->glyph_width(glyph), m_edited_font->glyph_height());
|
||||
status_bar.set_text(builder.to_string());
|
||||
statusbar.set_text(builder.to_string());
|
||||
};
|
||||
|
||||
m_name_textbox->on_change = [&] {
|
||||
@ -378,7 +378,7 @@ void FontEditorWidget::initialize(const String& path, RefPtr<Gfx::BitmapFont>&&
|
||||
on_initialize();
|
||||
}
|
||||
|
||||
void FontEditorWidget::initialize_menubar(GUI::MenuBar& menubar)
|
||||
void FontEditorWidget::initialize_menubar(GUI::Menubar& menubar)
|
||||
{
|
||||
auto& app_menu = menubar.add_menu("&File");
|
||||
app_menu.add_action(*m_new_action);
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
const String& path() { return m_path; }
|
||||
const Gfx::BitmapFont& edited_font() { return *m_edited_font; }
|
||||
void initialize(const String& path, RefPtr<Gfx::BitmapFont>&&);
|
||||
void initialize_menubar(GUI::MenuBar&);
|
||||
void initialize_menubar(GUI::Menubar&);
|
||||
|
||||
bool is_showing_font_metadata() { return m_font_metadata; }
|
||||
void set_show_font_metadata(bool b);
|
||||
|
@ -3,10 +3,10 @@
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
}
|
||||
|
||||
@GUI::ToolBarContainer {
|
||||
@GUI::ToolbarContainer {
|
||||
name: "toolbar_container"
|
||||
|
||||
@GUI::ToolBar {
|
||||
@GUI::Toolbar {
|
||||
name: "toolbar"
|
||||
}
|
||||
}
|
||||
@ -205,7 +205,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::StatusBar {
|
||||
name: "status_bar"
|
||||
@GUI::Statusbar {
|
||||
name: "statusbar"
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <LibDesktop/Launcher.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/BitmapFont.h>
|
||||
@ -98,7 +98,7 @@ int main(int argc, char** argv)
|
||||
|
||||
auto& font_editor = window->set_main_widget<FontEditorWidget>(path, move(edited_font));
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
font_editor.initialize_menubar(menubar);
|
||||
window->set_menubar(move(menubar));
|
||||
|
||||
|
@ -36,13 +36,13 @@
|
||||
#include <LibGUI/FilteringProxyModel.h>
|
||||
#include <LibGUI/ListView.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Splitter.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/TreeView.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibMarkdown/Document.h>
|
||||
@ -107,8 +107,8 @@ int main(int argc, char* argv[])
|
||||
widget.set_fill_with_background_color(true);
|
||||
widget.layout()->set_spacing(2);
|
||||
|
||||
auto& toolbar_container = widget.add<GUI::ToolBarContainer>();
|
||||
auto& toolbar = toolbar_container.add<GUI::ToolBar>();
|
||||
auto& toolbar_container = widget.add<GUI::ToolbarContainer>();
|
||||
auto& toolbar = toolbar_container.add<GUI::Toolbar>();
|
||||
|
||||
auto& splitter = widget.add<GUI::HorizontalSplitter>();
|
||||
|
||||
@ -272,7 +272,7 @@ int main(int argc, char* argv[])
|
||||
toolbar.add_action(*go_forward_action);
|
||||
toolbar.add_action(*go_home_action);
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("File");
|
||||
app_menu.add_action(GUI::CommonActions::make_about_action("Help", app_icon, window));
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <LibGUI/Clipboard.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGUI/TextEditor.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/FontDatabase.h>
|
||||
|
@ -35,12 +35,12 @@
|
||||
#include <LibGUI/FilePicker.h>
|
||||
#include <LibGUI/InputBox.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/StatusBar.h>
|
||||
#include <LibGUI/Statusbar.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGUI/TextEditor.h>
|
||||
#include <LibGUI/ToolBar.h>
|
||||
#include <LibGUI/Toolbar.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -67,7 +67,7 @@ HexEditorWidget::HexEditorWidget()
|
||||
update_title();
|
||||
};
|
||||
|
||||
m_statusbar = add<GUI::StatusBar>(5);
|
||||
m_statusbar = add<GUI::Statusbar>(5);
|
||||
|
||||
m_new_action = GUI::Action::create("New", { Mod_Ctrl, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/new.png"), [this](const GUI::Action&) {
|
||||
if (m_document_dirty) {
|
||||
@ -135,7 +135,7 @@ HexEditorWidget::~HexEditorWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void HexEditorWidget::initialize_menubar(GUI::MenuBar& menubar)
|
||||
void HexEditorWidget::initialize_menubar(GUI::Menubar& menubar)
|
||||
{
|
||||
auto& app_menu = menubar.add_menu("File");
|
||||
app_menu.add_action(*m_new_action);
|
||||
|
@ -42,7 +42,7 @@ class HexEditorWidget final : public GUI::Widget {
|
||||
public:
|
||||
virtual ~HexEditorWidget() override;
|
||||
void open_file(const String& path);
|
||||
void initialize_menubar(GUI::MenuBar&);
|
||||
void initialize_menubar(GUI::Menubar&);
|
||||
bool request_close();
|
||||
|
||||
private:
|
||||
@ -69,7 +69,7 @@ private:
|
||||
|
||||
GUI::ActionGroup m_bytes_per_row_actions;
|
||||
|
||||
RefPtr<GUI::StatusBar> m_statusbar;
|
||||
RefPtr<GUI::Statusbar> m_statusbar;
|
||||
|
||||
bool m_document_dirty { false };
|
||||
};
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include "HexEditorWidget.h"
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
@ -59,7 +59,7 @@ int main(int argc, char** argv)
|
||||
return GUI::Window::CloseRequestDecision::StayOpen;
|
||||
};
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
hex_editor_widget.initialize_menubar(menubar);
|
||||
window->set_menubar(menubar);
|
||||
window->show();
|
||||
|
@ -33,12 +33,12 @@
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
#include <LibGUI/InputBox.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/Splitter.h>
|
||||
#include <LibGUI/StackWidget.h>
|
||||
#include <LibGUI/TableView.h>
|
||||
#include <LibGUI/ToolBar.h>
|
||||
#include <LibGUI/ToolBarContainer.h>
|
||||
#include <LibGUI/Toolbar.h>
|
||||
#include <LibGUI/ToolbarContainer.h>
|
||||
|
||||
static IRCAppWindow* s_the;
|
||||
|
||||
@ -257,7 +257,7 @@ void IRCAppWindow::setup_actions()
|
||||
|
||||
void IRCAppWindow::setup_menus()
|
||||
{
|
||||
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&) {
|
||||
dbgln("Terminal: Quit menu activated!");
|
||||
@ -307,8 +307,8 @@ void IRCAppWindow::setup_widgets()
|
||||
widget.set_layout<GUI::VerticalBoxLayout>();
|
||||
widget.layout()->set_spacing(0);
|
||||
|
||||
auto& toolbar_container = widget.add<GUI::ToolBarContainer>();
|
||||
auto& toolbar = toolbar_container.add<GUI::ToolBar>();
|
||||
auto& toolbar_container = widget.add<GUI::ToolbarContainer>();
|
||||
auto& toolbar = toolbar_container.add<GUI::Toolbar>();
|
||||
toolbar.set_has_frame(false);
|
||||
toolbar.add_action(*m_change_nick_action);
|
||||
toolbar.add_separator();
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <LibGUI/FilePicker.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
@ -104,7 +104,7 @@ int main(int argc, char** argv)
|
||||
});
|
||||
|
||||
// Menu
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("File");
|
||||
app_menu.add_action(open_action);
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <LibGUI/ComboBox.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/WindowServerConnection.h>
|
||||
#include <LibKeyboard/CharacterMap.h>
|
||||
@ -186,7 +186,7 @@ int main(int argc, char** argv)
|
||||
app->quit();
|
||||
});
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("File");
|
||||
app_menu.add_action(quit_action);
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
@ -56,7 +56,7 @@ int main(int argc, char** argv)
|
||||
window->set_minimizable(false);
|
||||
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&) {
|
||||
app->quit();
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "RollWidget.h"
|
||||
#include "TrackManager.h"
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGfx/Font.h>
|
||||
#include <LibGfx/FontDatabase.h>
|
||||
#include <math.h>
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/FilePicker.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
@ -104,7 +104,7 @@ int main(int argc, char** argv)
|
||||
});
|
||||
audio_thread->start();
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("File");
|
||||
app_menu.add_action(GUI::Action::create("Export", { Mod_Ctrl, Key_E }, [&](const GUI::Action&) {
|
||||
|
@ -44,7 +44,7 @@
|
||||
#include <LibGUI/Clipboard.h>
|
||||
#include <LibGUI/FilePicker.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
@ -114,7 +114,7 @@ int main(int argc, char** argv)
|
||||
|
||||
window->show();
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
auto& file_menu = menubar->add_menu("&File");
|
||||
|
||||
auto open_image_file = [&](auto& path) {
|
||||
|
@ -37,10 +37,10 @@
|
||||
#include <LibGUI/FilePicker.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/ToolBar.h>
|
||||
#include <LibGUI/ToolBarContainer.h>
|
||||
#include <LibGUI/Toolbar.h>
|
||||
#include <LibGUI/ToolbarContainer.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
@ -97,8 +97,8 @@ int main(int argc, char** argv)
|
||||
root_widget.set_layout<GUI::VerticalBoxLayout>();
|
||||
root_widget.layout()->set_spacing(2);
|
||||
|
||||
auto& toolbar_container = root_widget.add<GUI::ToolBarContainer>();
|
||||
auto& main_toolbar = toolbar_container.add<GUI::ToolBar>();
|
||||
auto& toolbar_container = root_widget.add<GUI::ToolbarContainer>();
|
||||
auto& main_toolbar = toolbar_container.add<GUI::Toolbar>();
|
||||
|
||||
auto& widget = root_widget.add<QSWidget>();
|
||||
widget.on_scale_change = [&](int scale, Gfx::IntRect rect) {
|
||||
@ -270,7 +270,7 @@ int main(int argc, char** argv)
|
||||
main_toolbar.add_action(zoom_reset_action);
|
||||
main_toolbar.add_action(zoom_out_action);
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("&File");
|
||||
app_menu.add_action(open_action);
|
||||
|
@ -38,8 +38,8 @@
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Slider.h>
|
||||
#include <LibGUI/Splitter.h>
|
||||
#include <LibGUI/ToolBar.h>
|
||||
#include <LibGUI/ToolBarContainer.h>
|
||||
#include <LibGUI/Toolbar.h>
|
||||
#include <LibGUI/ToolbarContainer.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
|
||||
@ -75,8 +75,8 @@ SoundPlayerWidgetAdvancedView::SoundPlayerWidgetAdvancedView(GUI::Window& window
|
||||
this->manager().seek(value);
|
||||
};
|
||||
|
||||
auto& toolbar_container = m_player_view->add<GUI::ToolBarContainer>();
|
||||
auto& menubar = toolbar_container.add<GUI::ToolBar>();
|
||||
auto& toolbar_container = m_player_view->add<GUI::ToolbarContainer>();
|
||||
auto& menubar = toolbar_container.add<GUI::Toolbar>();
|
||||
|
||||
m_play_button = menubar.add<GUI::Button>();
|
||||
m_play_button->set_icon(is_paused() ? (!has_loaded_file() ? *m_play_icon : *m_pause_icon) : *m_pause_icon);
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/FilePicker.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/CharacterBitmap.h>
|
||||
#include <stdio.h>
|
||||
@ -78,7 +78,7 @@ int main(int argc, char** argv)
|
||||
window->set_title("Sound Player");
|
||||
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");
|
||||
|
||||
|
@ -3,10 +3,10 @@
|
||||
spacing: 0
|
||||
}
|
||||
|
||||
@GUI::ToolBarContainer {
|
||||
@GUI::BreadcrumbBar {
|
||||
@GUI::ToolbarContainer {
|
||||
@GUI::Breadcrumbbar {
|
||||
fixed_height: 25
|
||||
name: "breadcrumb_bar"
|
||||
name: "breadcrumbbar"
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
name: "tree_map"
|
||||
}
|
||||
|
||||
@GUI::StatusBar {
|
||||
name: "status_bar"
|
||||
@GUI::Statusbar {
|
||||
name: "statusbar"
|
||||
}
|
||||
}
|
||||
|
@ -35,13 +35,13 @@
|
||||
#include <LibDesktop/Launcher.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BreadcrumbBar.h>
|
||||
#include <LibGUI/Breadcrumbbar.h>
|
||||
#include <LibGUI/Clipboard.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/StatusBar.h>
|
||||
#include <LibGUI/Statusbar.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@ -209,7 +209,7 @@ static void populate_filesize_tree(TreeNode& root, Vector<MountInfo>& mounts, Ha
|
||||
update_totals(root);
|
||||
}
|
||||
|
||||
static void analyze(RefPtr<Tree> tree, SpaceAnalyzer::TreeMapWidget& treemapwidget, GUI::StatusBar& statusbar)
|
||||
static void analyze(RefPtr<Tree> tree, SpaceAnalyzer::TreeMapWidget& treemapwidget, GUI::Statusbar& statusbar)
|
||||
{
|
||||
// Build an in-memory tree mirroring the filesystem and for each node
|
||||
// calculate the sum of the file size for all its descendants.
|
||||
@ -285,12 +285,12 @@ int main(int argc, char* argv[])
|
||||
// Load widgets.
|
||||
auto& mainwidget = window->set_main_widget<GUI::Widget>();
|
||||
mainwidget.load_from_gml(space_analyzer_gml);
|
||||
auto& breadcrumbbar = *mainwidget.find_descendant_of_type_named<GUI::BreadcrumbBar>("breadcrumb_bar");
|
||||
auto& breadcrumbbar = *mainwidget.find_descendant_of_type_named<GUI::Breadcrumbbar>("breadcrumbbar");
|
||||
auto& treemapwidget = *mainwidget.find_descendant_of_type_named<SpaceAnalyzer::TreeMapWidget>("tree_map");
|
||||
auto& statusbar = *mainwidget.find_descendant_of_type_named<GUI::StatusBar>("status_bar");
|
||||
auto& statusbar = *mainwidget.find_descendant_of_type_named<GUI::Statusbar>("statusbar");
|
||||
|
||||
// Configure the menubar.
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
auto& app_menu = menubar->add_menu("File");
|
||||
app_menu.add_action(GUI::Action::create("Analyze", [&](auto&) {
|
||||
analyze(tree, treemapwidget, statusbar);
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/ModelEditingDelegate.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGUI/TableView.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <LibGUI/FilePicker.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <unistd.h>
|
||||
@ -110,7 +110,7 @@ int main(int argc, char* argv[])
|
||||
if (filename)
|
||||
spreadsheet_widget.load(filename);
|
||||
|
||||
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 New Sheet", Gfx::Bitmap::load_from_file("/res/icons/16x16/new-tab.png"), [&](auto&) {
|
||||
|
@ -49,15 +49,15 @@
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/LazyWidget.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/SeparatorWidget.h>
|
||||
#include <LibGUI/SortingProxyModel.h>
|
||||
#include <LibGUI/StackWidget.h>
|
||||
#include <LibGUI/StatusBar.h>
|
||||
#include <LibGUI/Statusbar.h>
|
||||
#include <LibGUI/TabWidget.h>
|
||||
#include <LibGUI/TableView.h>
|
||||
#include <LibGUI/ToolBar.h>
|
||||
#include <LibGUI/Toolbar.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/FontDatabase.h>
|
||||
@ -76,7 +76,7 @@ static NonnullRefPtr<GUI::Widget> build_devices_tab();
|
||||
static NonnullRefPtr<GUI::Widget> build_graphs_tab();
|
||||
static NonnullRefPtr<GUI::Widget> build_processors_tab();
|
||||
|
||||
static RefPtr<GUI::StatusBar> statusbar;
|
||||
static RefPtr<GUI::Statusbar> statusbar;
|
||||
|
||||
class UnavailableProcessWidget final : public GUI::Frame {
|
||||
C_OBJECT(UnavailableProcessWidget)
|
||||
@ -192,7 +192,7 @@ int main(int argc, char** argv)
|
||||
tabwidget_container.layout()->set_margins({ 4, 0, 4, 4 });
|
||||
auto& tabwidget = tabwidget_container.add<GUI::TabWidget>();
|
||||
|
||||
statusbar = main_widget.add<GUI::StatusBar>(3);
|
||||
statusbar = main_widget.add<GUI::Statusbar>(3);
|
||||
|
||||
auto process_model = ProcessModel::create();
|
||||
process_model->on_state_update = [&](int process_count, int thread_count) {
|
||||
@ -340,7 +340,7 @@ int main(int argc, char** argv)
|
||||
},
|
||||
&process_table_view);
|
||||
|
||||
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&) {
|
||||
GUI::Application::the()->quit();
|
||||
@ -408,9 +408,9 @@ int main(int argc, char** argv)
|
||||
return app->exec();
|
||||
}
|
||||
|
||||
class ProgressBarPaintingDelegate final : public GUI::TableCellPaintingDelegate {
|
||||
class ProgressbarPaintingDelegate final : public GUI::TableCellPaintingDelegate {
|
||||
public:
|
||||
virtual ~ProgressBarPaintingDelegate() override { }
|
||||
virtual ~ProgressbarPaintingDelegate() override { }
|
||||
|
||||
virtual void paint(GUI::Painter& painter, const Gfx::IntRect& a_rect, const Palette& palette, const GUI::ModelIndex& index) override
|
||||
{
|
||||
@ -421,7 +421,7 @@ public:
|
||||
String text;
|
||||
if (data.is_string())
|
||||
text = data.as_string();
|
||||
Gfx::StylePainter::paint_progress_bar(painter, rect, palette, 0, 100, percentage, text);
|
||||
Gfx::StylePainter::paint_progressbar(painter, rect, palette, 0, 100, percentage, text);
|
||||
painter.draw_rect(rect, Color::Black);
|
||||
}
|
||||
};
|
||||
@ -580,7 +580,7 @@ NonnullRefPtr<GUI::Widget> build_file_systems_tab()
|
||||
df_fields.empend("block_size", "Block size", Gfx::TextAlignment::CenterRight);
|
||||
fs_table_view.set_model(GUI::SortingProxyModel::create(GUI::JsonArrayModel::create("/proc/df", move(df_fields))));
|
||||
|
||||
fs_table_view.set_column_painting_delegate(3, make<ProgressBarPaintingDelegate>());
|
||||
fs_table_view.set_column_painting_delegate(3, make<ProgressbarPaintingDelegate>());
|
||||
|
||||
fs_table_view.model()->update();
|
||||
};
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <LibGUI/GroupBox.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/OpacitySlider.h>
|
||||
#include <LibGUI/RadioButton.h>
|
||||
#include <LibGUI/SpinBox.h>
|
||||
@ -426,7 +426,7 @@ int main(int argc, char** argv)
|
||||
terminal.context_menu().add_separator();
|
||||
terminal.context_menu().add_action(open_settings_action);
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("&File");
|
||||
app_menu.add_action(GUI::Action::create("Open New &Terminal", { Mod_Ctrl | Mod_Shift, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/app-terminal.png"), [&](auto&) {
|
||||
|
@ -47,15 +47,15 @@
|
||||
#include <LibGUI/GroupBox.h>
|
||||
#include <LibGUI/INISyntaxHighlighter.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/RegularEditingEngine.h>
|
||||
#include <LibGUI/Splitter.h>
|
||||
#include <LibGUI/StatusBar.h>
|
||||
#include <LibGUI/Statusbar.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGUI/TextEditor.h>
|
||||
#include <LibGUI/ToolBar.h>
|
||||
#include <LibGUI/ToolBarContainer.h>
|
||||
#include <LibGUI/Toolbar.h>
|
||||
#include <LibGUI/ToolbarContainer.h>
|
||||
#include <LibGUI/VimEditingEngine.h>
|
||||
#include <LibGfx/Font.h>
|
||||
#include <LibJS/SyntaxHighlighter.h>
|
||||
@ -69,8 +69,8 @@ TextEditorWidget::TextEditorWidget()
|
||||
|
||||
m_config = Core::ConfigFile::get_for_app("TextEditor");
|
||||
|
||||
m_toolbar = *find_descendant_of_type_named<GUI::ToolBar>("toolbar");
|
||||
m_toolbar_container = *find_descendant_of_type_named<GUI::ToolBarContainer>("toolbar_container");
|
||||
m_toolbar = *find_descendant_of_type_named<GUI::Toolbar>("toolbar");
|
||||
m_toolbar_container = *find_descendant_of_type_named<GUI::ToolbarContainer>("toolbar_container");
|
||||
|
||||
m_editor = *find_descendant_of_type_named<GUI::TextEditor>("editor");
|
||||
m_editor->set_ruler_visible(true);
|
||||
@ -272,7 +272,7 @@ TextEditorWidget::TextEditorWidget()
|
||||
m_editor->add_custom_context_menu_action(*m_find_next_action);
|
||||
m_editor->add_custom_context_menu_action(*m_find_previous_action);
|
||||
|
||||
m_statusbar = *find_descendant_of_type_named<GUI::StatusBar>("statusbar");
|
||||
m_statusbar = *find_descendant_of_type_named<GUI::Statusbar>("statusbar");
|
||||
|
||||
m_editor->on_cursor_change = [this] { update_statusbar(); };
|
||||
m_editor->on_selection_change = [this] { update_statusbar(); };
|
||||
@ -359,7 +359,7 @@ TextEditorWidget::~TextEditorWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void TextEditorWidget::initialize_menubar(GUI::MenuBar& menubar)
|
||||
void TextEditorWidget::initialize_menubar(GUI::Menubar& menubar)
|
||||
{
|
||||
auto& app_menu = menubar.add_menu("&File");
|
||||
app_menu.add_action(*m_new_action);
|
||||
@ -423,10 +423,10 @@ void TextEditorWidget::initialize_menubar(GUI::MenuBar& menubar)
|
||||
|
||||
m_layout_statusbar_action = GUI::Action::create_checkable("&Status Bar", [&](auto& action) {
|
||||
action.is_checked() ? m_statusbar->set_visible(true) : m_statusbar->set_visible(false);
|
||||
m_config->write_bool_entry("Layout", "ShowStatusBar", action.is_checked());
|
||||
m_config->write_bool_entry("Layout", "ShowStatusbar", action.is_checked());
|
||||
m_config->sync();
|
||||
});
|
||||
auto show_statusbar = m_config->read_bool_entry("Layout", "ShowStatusBar", true);
|
||||
auto show_statusbar = m_config->read_bool_entry("Layout", "ShowStatusbar", true);
|
||||
m_layout_statusbar_action->set_checked(show_statusbar);
|
||||
m_statusbar->set_visible(show_statusbar);
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
void set_auto_detect_preview_mode(bool value) { m_auto_detect_preview_mode = value; }
|
||||
|
||||
void update_title();
|
||||
void initialize_menubar(GUI::MenuBar&);
|
||||
void initialize_menubar(GUI::Menubar&);
|
||||
|
||||
private:
|
||||
TextEditorWidget();
|
||||
@ -92,9 +92,9 @@ private:
|
||||
RefPtr<GUI::Action> m_markdown_preview_action;
|
||||
RefPtr<GUI::Action> m_html_preview_action;
|
||||
|
||||
RefPtr<GUI::ToolBar> m_toolbar;
|
||||
RefPtr<GUI::ToolBarContainer> m_toolbar_container;
|
||||
RefPtr<GUI::StatusBar> m_statusbar;
|
||||
RefPtr<GUI::Toolbar> m_toolbar;
|
||||
RefPtr<GUI::ToolbarContainer> m_toolbar_container;
|
||||
RefPtr<GUI::Statusbar> m_statusbar;
|
||||
|
||||
RefPtr<GUI::TextBox> m_find_textbox;
|
||||
RefPtr<GUI::TextBox> m_replace_textbox;
|
||||
|
@ -6,10 +6,10 @@
|
||||
spacing: 2
|
||||
}
|
||||
|
||||
@GUI::ToolBarContainer {
|
||||
@GUI::ToolbarContainer {
|
||||
name: "toolbar_container"
|
||||
|
||||
@GUI::ToolBar {
|
||||
@GUI::Toolbar {
|
||||
name: "toolbar"
|
||||
}
|
||||
}
|
||||
@ -105,7 +105,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::StatusBar {
|
||||
@GUI::Statusbar {
|
||||
name: "statusbar"
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include "TextEditorWidget.h"
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
@ -85,7 +85,7 @@ int main(int argc, char** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
text_widget.initialize_menubar(menubar);
|
||||
window->set_menubar(menubar);
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <LibGUI/CheckBox.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/RadioButton.h>
|
||||
#include <LibGUI/StatusBar.h>
|
||||
#include <LibGUI/Statusbar.h>
|
||||
#include <LibGUI/TextEditor.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibGfx/WindowTheme.h>
|
||||
@ -65,7 +65,7 @@ private:
|
||||
m_checkbox->set_text("Check box");
|
||||
m_radio = add<GUI::RadioButton>();
|
||||
m_radio->set_text("Radio button");
|
||||
m_statusbar = add<GUI::StatusBar>();
|
||||
m_statusbar = add<GUI::Statusbar>();
|
||||
m_statusbar->set_text("Status bar");
|
||||
m_editor = add<GUI::TextEditor>();
|
||||
m_editor->set_text("Text editor\nwith multiple\nlines.");
|
||||
@ -84,7 +84,7 @@ private:
|
||||
RefPtr<GUI::Button> m_button;
|
||||
RefPtr<GUI::CheckBox> m_checkbox;
|
||||
RefPtr<GUI::RadioButton> m_radio;
|
||||
RefPtr<GUI::StatusBar> m_statusbar;
|
||||
RefPtr<GUI::Statusbar> m_statusbar;
|
||||
};
|
||||
|
||||
PreviewWidget::PreviewWidget(const Gfx::Palette& preview_palette)
|
||||
|
@ -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/Painter.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibGUI/Window.h>
|
||||
@ -233,7 +233,7 @@ int main(int argc, char** argv)
|
||||
root_widget.set_layout<GUI::VerticalBoxLayout>();
|
||||
root_widget.layout()->set_spacing(0);
|
||||
|
||||
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&) { app->quit(); }));
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibGUI/Window.h>
|
||||
@ -263,7 +263,7 @@ int main(int argc, char** argv)
|
||||
auto app_icon = GUI::Icon::default_icon("app-cube");
|
||||
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");
|
||||
auto show_window_frame_action = GUI::Action::create_checkable("Show window frame", [&](auto& action) {
|
||||
cube.set_show_window_frame(action.is_checked());
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <LibGUI/Application.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 <unistd.h>
|
||||
@ -99,7 +99,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
auto& eyes = window->set_main_widget<EyesWidget>(num_eyes, full_rows, extra_columns);
|
||||
|
||||
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&) { app->quit(); }));
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <LibGUI/Frame.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibGUI/Window.h>
|
||||
@ -198,7 +198,7 @@ int main(int argc, char** argv)
|
||||
auto& main_widget = window->set_main_widget<MainFrame>();
|
||||
main_widget.set_fill_with_background_color(true);
|
||||
|
||||
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&) { app->quit(); }));
|
||||
|
||||
|
@ -58,7 +58,7 @@ DemoWizardDialog::DemoWizardDialog(GUI::Window* parent_window)
|
||||
"Installation in progress...",
|
||||
"Please wait. Do not turn off your computer.");
|
||||
m_page_2->body_widget().load_from_gml(demo_wizard_page_2_gml);
|
||||
m_page_2_progress_bar = m_page_2->body_widget().find_descendant_of_type_named<GUI::ProgressBar>("page_2_progress_bar");
|
||||
m_page_2_progressbar = m_page_2->body_widget().find_descendant_of_type_named<GUI::Progressbar>("page_2_progressbar");
|
||||
m_page_2_timer = Core::Timer::construct(this);
|
||||
m_page_2->on_page_enter = [&]() {
|
||||
m_page_2_progress_value = 0;
|
||||
@ -71,7 +71,7 @@ DemoWizardDialog::DemoWizardDialog(GUI::Window* parent_window)
|
||||
m_page_2_timer->on_timeout = [&]() {
|
||||
if (m_page_2_progress_value < 100)
|
||||
m_page_2_progress_value++;
|
||||
m_page_2_progress_bar->set_value(m_page_2_progress_value);
|
||||
m_page_2_progressbar->set_value(m_page_2_progress_value);
|
||||
|
||||
// Go to final page on progress completion
|
||||
if (m_page_2_progress_value == 100) {
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibGUI/ProgressBar.h>
|
||||
#include <LibGUI/Progressbar.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGUI/Wizards/CoverWizardPage.h>
|
||||
@ -47,7 +47,7 @@ private:
|
||||
RefPtr<GUI::TextBox> m_page_1_location_text_box;
|
||||
|
||||
RefPtr<GUI::WizardPage> m_page_2;
|
||||
RefPtr<GUI::ProgressBar> m_page_2_progress_bar;
|
||||
RefPtr<GUI::Progressbar> m_page_2_progressbar;
|
||||
int m_page_2_progress_value { 0 };
|
||||
RefPtr<Core::Timer> m_page_2_timer;
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
fixed_height: 32
|
||||
}
|
||||
|
||||
@GUI::ProgressBar {
|
||||
name: "page_2_progress_bar"
|
||||
@GUI::Progressbar {
|
||||
name: "page_2_progressbar"
|
||||
fixed_height: 28
|
||||
}
|
||||
|
||||
|
@ -126,15 +126,15 @@
|
||||
|
||||
@GUI::Button {
|
||||
name: "enabled_coolbar_button"
|
||||
text: "CoolBar button"
|
||||
button_style: "CoolBar"
|
||||
text: "Coolbar button"
|
||||
button_style: "Coolbar"
|
||||
}
|
||||
|
||||
@GUI::Button {
|
||||
name: "disabled_coolbar_button"
|
||||
text: "Disabled"
|
||||
enabled: "false"
|
||||
button_style: "CoolBar"
|
||||
button_style: "Coolbar"
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
|
@ -42,7 +42,7 @@
|
||||
@GUI::Widget {
|
||||
}
|
||||
|
||||
@GUI::ScrollBar {
|
||||
@GUI::Scrollbar {
|
||||
name: "enabled_scrollbar"
|
||||
fixed_height: 16
|
||||
fixed_width: -1
|
||||
@ -60,7 +60,7 @@
|
||||
@GUI::Widget {
|
||||
}
|
||||
|
||||
@GUI::ScrollBar {
|
||||
@GUI::Scrollbar {
|
||||
name: "disabled_scrollbar"
|
||||
fixed_height: 16
|
||||
fixed_width: -1
|
||||
@ -75,7 +75,7 @@
|
||||
margins: [8, 8, 8, 8]
|
||||
}
|
||||
|
||||
@GUI::VerticalProgressBar {
|
||||
@GUI::VerticalProgressbar {
|
||||
name: "vertical_progressbar_left"
|
||||
fixed_width: 36
|
||||
}
|
||||
@ -103,7 +103,7 @@
|
||||
@GUI::VerticalSeparator {
|
||||
}
|
||||
|
||||
@GUI::VerticalProgressBar {
|
||||
@GUI::VerticalProgressbar {
|
||||
name: "vertical_progressbar_right"
|
||||
fixed_width: 36
|
||||
}
|
||||
@ -160,7 +160,7 @@
|
||||
@GUI::HorizontalSeparator {
|
||||
}
|
||||
|
||||
@GUI::HorizontalProgressBar {
|
||||
@GUI::HorizontalProgressbar {
|
||||
name: "horizontal_progressbar"
|
||||
fixed_height: 20
|
||||
}
|
||||
|
@ -191,10 +191,10 @@ GalleryWidget::GalleryWidget()
|
||||
auto& sliders_tab = tab_widget.add_tab<GUI::Widget>("Sliders");
|
||||
sliders_tab.load_from_gml(sliders_tab_gml);
|
||||
|
||||
m_vertical_progressbar_left = sliders_tab.find_descendant_of_type_named<GUI::VerticalProgressBar>("vertical_progressbar_left");
|
||||
m_vertical_progressbar_left = sliders_tab.find_descendant_of_type_named<GUI::VerticalProgressbar>("vertical_progressbar_left");
|
||||
m_vertical_progressbar_left->set_value(0);
|
||||
|
||||
m_vertical_progressbar_right = sliders_tab.find_descendant_of_type_named<GUI::VerticalProgressBar>("vertical_progressbar_right");
|
||||
m_vertical_progressbar_right = sliders_tab.find_descendant_of_type_named<GUI::VerticalProgressbar>("vertical_progressbar_right");
|
||||
m_vertical_progressbar_right->set_value(100);
|
||||
|
||||
m_vertical_slider_left = sliders_tab.find_descendant_of_type_named<GUI::VerticalSlider>("vertical_slider_left");
|
||||
@ -208,7 +208,7 @@ GalleryWidget::GalleryWidget()
|
||||
m_vertical_progressbar_right->set_value((100 / m_vertical_slider_right->max()) * (m_vertical_slider_right->max() - value));
|
||||
};
|
||||
|
||||
m_horizontal_progressbar = sliders_tab.find_descendant_of_type_named<GUI::HorizontalProgressBar>("horizontal_progressbar");
|
||||
m_horizontal_progressbar = sliders_tab.find_descendant_of_type_named<GUI::HorizontalProgressbar>("horizontal_progressbar");
|
||||
m_horizontal_progressbar->set_value(0);
|
||||
|
||||
m_horizontal_slider_left = sliders_tab.find_descendant_of_type_named<GUI::HorizontalSlider>("horizontal_slider_left");
|
||||
@ -225,10 +225,10 @@ GalleryWidget::GalleryWidget()
|
||||
m_horizontal_slider_left->set_value((value * 100) / m_horizontal_slider_right->max());
|
||||
};
|
||||
|
||||
m_enabled_scrollbar = sliders_tab.find_descendant_of_type_named<GUI::ScrollBar>("enabled_scrollbar");
|
||||
m_enabled_scrollbar = sliders_tab.find_descendant_of_type_named<GUI::Scrollbar>("enabled_scrollbar");
|
||||
m_enabled_scrollbar->set_orientation(Orientation::Horizontal);
|
||||
|
||||
m_disabled_scrollbar = sliders_tab.find_descendant_of_type_named<GUI::ScrollBar>("disabled_scrollbar");
|
||||
m_disabled_scrollbar = sliders_tab.find_descendant_of_type_named<GUI::Scrollbar>("disabled_scrollbar");
|
||||
m_disabled_scrollbar->set_orientation(Orientation::Horizontal);
|
||||
|
||||
m_opacity_imagewidget = sliders_tab.find_descendant_of_type_named<GUI::ImageWidget>("opacity_imagewidget");
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <LibGUI/ImageWidget.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/OpacitySlider.h>
|
||||
#include <LibGUI/ProgressBar.h>
|
||||
#include <LibGUI/Progressbar.h>
|
||||
#include <LibGUI/Slider.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
@ -61,12 +61,12 @@ private:
|
||||
RefPtr<GUI::HorizontalSlider> m_horizontal_slider_left;
|
||||
RefPtr<GUI::HorizontalSlider> m_horizontal_slider_right;
|
||||
|
||||
RefPtr<GUI::VerticalProgressBar> m_vertical_progressbar_left;
|
||||
RefPtr<GUI::VerticalProgressBar> m_vertical_progressbar_right;
|
||||
RefPtr<GUI::HorizontalProgressBar> m_horizontal_progressbar;
|
||||
RefPtr<GUI::VerticalProgressbar> m_vertical_progressbar_left;
|
||||
RefPtr<GUI::VerticalProgressbar> m_vertical_progressbar_right;
|
||||
RefPtr<GUI::HorizontalProgressbar> m_horizontal_progressbar;
|
||||
|
||||
RefPtr<GUI::ScrollBar> m_enabled_scrollbar;
|
||||
RefPtr<GUI::ScrollBar> m_disabled_scrollbar;
|
||||
RefPtr<GUI::Scrollbar> m_enabled_scrollbar;
|
||||
RefPtr<GUI::Scrollbar> m_disabled_scrollbar;
|
||||
|
||||
RefPtr<GUI::TextEditor> m_text_editor;
|
||||
RefPtr<GUI::TextEditor> m_wizard_output;
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@ -75,7 +75,7 @@ int main(int argc, char** argv)
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
window->set_main_widget<GalleryWidget>();
|
||||
|
||||
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&) { app->quit(); }));
|
||||
|
@ -72,8 +72,8 @@ void DebugInfoWidget::init_toolbar()
|
||||
DebugInfoWidget::DebugInfoWidget()
|
||||
{
|
||||
set_layout<GUI::VerticalBoxLayout>();
|
||||
auto& toolbar_container = add<GUI::ToolBarContainer>();
|
||||
m_toolbar = toolbar_container.add<GUI::ToolBar>();
|
||||
auto& toolbar_container = add<GUI::ToolbarContainer>();
|
||||
m_toolbar = toolbar_container.add<GUI::Toolbar>();
|
||||
init_toolbar();
|
||||
auto& bottom_box = add<GUI::Widget>();
|
||||
bottom_box.set_layout<GUI::HorizontalBoxLayout>();
|
||||
|
@ -33,8 +33,8 @@
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/TableView.h>
|
||||
#include <LibGUI/ToolBar.h>
|
||||
#include <LibGUI/ToolBarContainer.h>
|
||||
#include <LibGUI/Toolbar.h>
|
||||
#include <LibGUI/ToolbarContainer.h>
|
||||
#include <LibGUI/TreeView.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <sys/arch/i386/regs.h>
|
||||
@ -61,7 +61,7 @@ private:
|
||||
RefPtr<GUI::TableView> m_registers_view;
|
||||
RefPtr<GUI::ListView> m_backtrace_view;
|
||||
RefPtr<GUI::Menu> m_variable_context_menu;
|
||||
RefPtr<GUI::ToolBar> m_toolbar;
|
||||
RefPtr<GUI::Toolbar> m_toolbar;
|
||||
RefPtr<GUI::Action> m_continue_action;
|
||||
RefPtr<GUI::Action> m_singlestep_action;
|
||||
RefPtr<GUI::Action> m_step_in_action;
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibJS/SyntaxHighlighter.h>
|
||||
#include <LibMarkdown/Document.h>
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <LibDiff/Hunks.h>
|
||||
#include <LibGUI/AbstractView.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGfx/Color.h>
|
||||
#include <LibGfx/Font.h>
|
||||
#include <LibGfx/FontDatabase.h>
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "GitFilesView.h"
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
|
||||
namespace HackStudio {
|
||||
|
@ -66,7 +66,7 @@
|
||||
#include <LibGUI/ItemListModel.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/RegularEditingEngine.h>
|
||||
#include <LibGUI/Splitter.h>
|
||||
@ -75,8 +75,8 @@
|
||||
#include <LibGUI/TableView.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGUI/TextEditor.h>
|
||||
#include <LibGUI/ToolBar.h>
|
||||
#include <LibGUI/ToolBarContainer.h>
|
||||
#include <LibGUI/Toolbar.h>
|
||||
#include <LibGUI/ToolbarContainer.h>
|
||||
#include <LibGUI/TreeView.h>
|
||||
#include <LibGUI/VimEditingEngine.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
@ -103,7 +103,7 @@ HackStudioWidget::HackStudioWidget(const String& path_to_project)
|
||||
|
||||
open_project(path_to_project);
|
||||
|
||||
auto& toolbar_container = add<GUI::ToolBarContainer>();
|
||||
auto& toolbar_container = add<GUI::ToolbarContainer>();
|
||||
|
||||
auto& outer_splitter = add<GUI::HorizontalSplitter>();
|
||||
|
||||
@ -785,7 +785,7 @@ void HackStudioWidget::create_form_editor(GUI::Widget& parent)
|
||||
{
|
||||
m_form_inner_container = parent.add<GUI::Widget>();
|
||||
m_form_inner_container->set_layout<GUI::HorizontalBoxLayout>();
|
||||
auto& form_widgets_toolbar = m_form_inner_container->add<GUI::ToolBar>(Orientation::Vertical, 26);
|
||||
auto& form_widgets_toolbar = m_form_inner_container->add<GUI::Toolbar>(Orientation::Vertical, 26);
|
||||
form_widgets_toolbar.set_fixed_width(38);
|
||||
|
||||
GUI::ActionGroup tool_actions;
|
||||
@ -868,7 +868,7 @@ void HackStudioWidget::create_form_editor(GUI::Widget& parent)
|
||||
|
||||
void HackStudioWidget::create_toolbar(GUI::Widget& parent)
|
||||
{
|
||||
auto& toolbar = parent.add<GUI::ToolBar>();
|
||||
auto& toolbar = parent.add<GUI::Toolbar>();
|
||||
toolbar.add_action(*m_new_file_action);
|
||||
toolbar.add_action(*m_new_directory_action);
|
||||
toolbar.add_action(*m_save_action);
|
||||
@ -950,7 +950,7 @@ void HackStudioWidget::create_project_tab(GUI::Widget& parent)
|
||||
};
|
||||
}
|
||||
|
||||
void HackStudioWidget::create_app_menubar(GUI::MenuBar& menubar)
|
||||
void HackStudioWidget::create_app_menubar(GUI::Menubar& menubar)
|
||||
{
|
||||
auto& file_menu = menubar.add_menu("&File");
|
||||
file_menu.add_action(*m_new_project_action);
|
||||
@ -962,7 +962,7 @@ void HackStudioWidget::create_app_menubar(GUI::MenuBar& menubar)
|
||||
}));
|
||||
}
|
||||
|
||||
void HackStudioWidget::create_project_menubar(GUI::MenuBar& menubar)
|
||||
void HackStudioWidget::create_project_menubar(GUI::Menubar& menubar)
|
||||
{
|
||||
auto& project_menu = menubar.add_menu("&Project");
|
||||
project_menu.add_action(*m_new_file_action);
|
||||
@ -971,7 +971,7 @@ void HackStudioWidget::create_project_menubar(GUI::MenuBar& menubar)
|
||||
project_menu.add_action(*create_set_autocomplete_mode_action());
|
||||
}
|
||||
|
||||
void HackStudioWidget::create_edit_menubar(GUI::MenuBar& menubar)
|
||||
void HackStudioWidget::create_edit_menubar(GUI::Menubar& menubar)
|
||||
{
|
||||
auto& edit_menu = menubar.add_menu("&Edit");
|
||||
edit_menu.add_action(GUI::Action::create("Find in Files...", { Mod_Ctrl | Mod_Shift, Key_F }, Gfx::Bitmap::load_from_file("/res/icons/16x16/find.png"), [this](auto&) {
|
||||
@ -991,7 +991,7 @@ void HackStudioWidget::create_edit_menubar(GUI::MenuBar& menubar)
|
||||
edit_menu.add_action(vim_emulation_setting_action);
|
||||
}
|
||||
|
||||
void HackStudioWidget::create_build_menubar(GUI::MenuBar& menubar)
|
||||
void HackStudioWidget::create_build_menubar(GUI::Menubar& menubar)
|
||||
{
|
||||
auto& build_menu = menubar.add_menu("&Build");
|
||||
build_menu.add_action(*m_build_action);
|
||||
@ -1002,7 +1002,7 @@ void HackStudioWidget::create_build_menubar(GUI::MenuBar& menubar)
|
||||
build_menu.add_action(*m_debug_action);
|
||||
}
|
||||
|
||||
void HackStudioWidget::create_view_menubar(GUI::MenuBar& menubar)
|
||||
void HackStudioWidget::create_view_menubar(GUI::Menubar& menubar)
|
||||
{
|
||||
auto hide_action_tabs_action = GUI::Action::create("&Hide Action Tabs", { Mod_Ctrl | Mod_Shift, Key_X }, [this](auto&) {
|
||||
hide_action_tabs();
|
||||
@ -1048,7 +1048,7 @@ void HackStudioWidget::create_view_menubar(GUI::MenuBar& menubar)
|
||||
view_menu.add_action(*m_remove_current_terminal_action);
|
||||
}
|
||||
|
||||
void HackStudioWidget::create_help_menubar(GUI::MenuBar& menubar)
|
||||
void HackStudioWidget::create_help_menubar(GUI::Menubar& menubar)
|
||||
{
|
||||
auto& help_menu = menubar.add_menu("Help");
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Hack Studio", GUI::Icon::default_icon("app-hack-studio"), window()));
|
||||
@ -1073,7 +1073,7 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_set_autocomplete_mode_action
|
||||
return action;
|
||||
}
|
||||
|
||||
void HackStudioWidget::initialize_menubar(GUI::MenuBar& menubar)
|
||||
void HackStudioWidget::initialize_menubar(GUI::Menubar& menubar)
|
||||
{
|
||||
create_app_menubar(menubar);
|
||||
create_project_menubar(menubar);
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "ProjectFile.h"
|
||||
#include "TerminalWrapper.h"
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGUI/Splitter.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibThread/Thread.h>
|
||||
@ -62,7 +62,7 @@ public:
|
||||
void set_current_editor_wrapper(RefPtr<EditorWrapper>);
|
||||
|
||||
String currently_open_file() const { return m_currently_open_file; }
|
||||
void initialize_menubar(GUI::MenuBar&);
|
||||
void initialize_menubar(GUI::Menubar&);
|
||||
|
||||
Locator& locator()
|
||||
{
|
||||
@ -117,12 +117,12 @@ private:
|
||||
void create_form_editor(GUI::Widget& parent);
|
||||
void create_toolbar(GUI::Widget& parent);
|
||||
void create_action_tab(GUI::Widget& parent);
|
||||
void create_app_menubar(GUI::MenuBar&);
|
||||
void create_project_menubar(GUI::MenuBar&);
|
||||
void create_edit_menubar(GUI::MenuBar&);
|
||||
void create_build_menubar(GUI::MenuBar&);
|
||||
void create_view_menubar(GUI::MenuBar&);
|
||||
void create_help_menubar(GUI::MenuBar&);
|
||||
void create_app_menubar(GUI::Menubar&);
|
||||
void create_project_menubar(GUI::Menubar&);
|
||||
void create_edit_menubar(GUI::Menubar&);
|
||||
void create_build_menubar(GUI::Menubar&);
|
||||
void create_view_menubar(GUI::Menubar&);
|
||||
void create_help_menubar(GUI::Menubar&);
|
||||
void create_project_tab(GUI::Widget& parent);
|
||||
void configure_project_tree_view();
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <LibCore/EventLoop.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Notification.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
@ -97,7 +97,7 @@ int main(int argc, char** argv)
|
||||
|
||||
s_window->set_title(String::formatted("{} - Hack Studio", s_hack_studio_widget->project().name()));
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
s_hack_studio_widget->initialize_menubar(menubar);
|
||||
s_window->set_menubar(menubar);
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/ModelEditingDelegate.h>
|
||||
#include <LibGUI/ProcessChooser.h>
|
||||
@ -128,7 +128,7 @@ int main(int argc, char** argv)
|
||||
window->resize(685, 500);
|
||||
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&) { app->quit(); }));
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <LibGUI/GMLSyntaxHighlighter.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/Splitter.h>
|
||||
@ -153,7 +153,7 @@ int main(int argc, char** argv)
|
||||
});
|
||||
};
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
auto& app_menu = menubar->add_menu("&File");
|
||||
|
||||
app_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) {
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <LibGUI/Button.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/ProcessChooser.h>
|
||||
@ -140,7 +140,7 @@ int main(int argc, char** argv)
|
||||
individual_sample_view.set_model(move(model));
|
||||
};
|
||||
|
||||
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&) { app->quit(); }));
|
||||
|
||||
|
@ -34,9 +34,9 @@
|
||||
#include <LibGUI/Button.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/StatusBar.h>
|
||||
#include <LibGUI/Statusbar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
@ -98,7 +98,7 @@ int main(int argc, char** argv)
|
||||
|
||||
auto& board_view = main_widget.add<BoardView>(&game.board());
|
||||
board_view.set_focus(true);
|
||||
auto& statusbar = main_widget.add<GUI::StatusBar>();
|
||||
auto& statusbar = main_widget.add<GUI::Statusbar>();
|
||||
|
||||
auto update = [&]() {
|
||||
board_view.set_board(&game.board());
|
||||
@ -178,7 +178,7 @@ int main(int argc, char** argv)
|
||||
}
|
||||
};
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("File");
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <LibGUI/Application.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 <unistd.h>
|
||||
@ -67,7 +67,7 @@ int main(int argc, char** argv)
|
||||
auto& game = window->set_main_widget<Breakout::Game>();
|
||||
window->show();
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("Game");
|
||||
app_menu.add_action(GUI::Action::create_checkable("Pause", { {}, Key_P }, [&](auto& action) {
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <LibGUI/FilePicker.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <unistd.h>
|
||||
@ -96,7 +96,7 @@ int main(int argc, char** argv)
|
||||
widget.set_coordinates(config->read_bool_entry("Style", "Coordinates", true));
|
||||
widget.set_show_available_moves(config->read_bool_entry("Style", "ShowAvailableMoves", true));
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
auto& app_menu = menubar->add_menu("Game");
|
||||
|
||||
app_menu.add_action(GUI::Action::create("Resign", { Mod_None, Key_F3 }, [&](auto&) {
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
@ -69,7 +69,7 @@ int main(int argc, char** argv)
|
||||
auto& game = window->set_main_widget<Game>();
|
||||
window->set_minimum_size(game.columns(), game.rows());
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("Game");
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <LibGUI/ImageWidget.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
@ -92,7 +92,7 @@ int main(int argc, char** argv)
|
||||
auto& flag_label = container.add<GUI::Label>();
|
||||
auto& face_button = container.add<GUI::Button>();
|
||||
face_button.set_focus_policy(GUI::FocusPolicy::TabFocus);
|
||||
face_button.set_button_style(Gfx::ButtonStyle::CoolBar);
|
||||
face_button.set_button_style(Gfx::ButtonStyle::Coolbar);
|
||||
face_button.set_fixed_size(36, 36);
|
||||
|
||||
auto& time_image = container.add<GUI::ImageWidget>();
|
||||
@ -104,7 +104,7 @@ int main(int argc, char** argv)
|
||||
window->resize(size);
|
||||
});
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("Game");
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <LibGUI/Application.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 <unistd.h>
|
||||
@ -74,7 +74,7 @@ int main(int argc, char** argv)
|
||||
window->set_main_widget<Pong::Game>();
|
||||
window->show();
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("Game");
|
||||
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <LibGUI/Button.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
@ -78,7 +78,7 @@ int main(int argc, char** argv)
|
||||
|
||||
auto& game = window->set_main_widget<SnakeGame>();
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
|
||||
auto& app_menu = menubar->add_menu("Game");
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
@ -63,7 +63,7 @@ int main(int argc, char** argv)
|
||||
window->set_title(String::formatted("Score: {} - Solitaire", score));
|
||||
});
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto menubar = GUI::Menubar::construct();
|
||||
auto& app_menu = menubar->add_menu("Game");
|
||||
|
||||
app_menu.add_action(GUI::Action::create("New game", { Mod_None, Key_F2 }, [&](auto&) {
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/ModelEditingDelegate.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <LibGUI/Clipboard.h>
|
||||
#include <LibGUI/Desktop.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGUI/WindowServerConnection.h>
|
||||
|
@ -25,13 +25,13 @@
|
||||
*/
|
||||
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
#include <LibGUI/BreadcrumbBar.h>
|
||||
#include <LibGUI/Breadcrumbbar.h>
|
||||
#include <LibGUI/Button.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGfx/Font.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
|
||||
REGISTER_WIDGET(GUI, BreadcrumbBar)
|
||||
REGISTER_WIDGET(GUI, Breadcrumbbar)
|
||||
|
||||
namespace GUI {
|
||||
|
||||
@ -76,26 +76,26 @@ private:
|
||||
BreadcrumbButton() { }
|
||||
};
|
||||
|
||||
BreadcrumbBar::BreadcrumbBar()
|
||||
Breadcrumbbar::Breadcrumbbar()
|
||||
{
|
||||
auto& layout = set_layout<HorizontalBoxLayout>();
|
||||
layout.set_spacing(0);
|
||||
}
|
||||
|
||||
BreadcrumbBar::~BreadcrumbBar()
|
||||
Breadcrumbbar::~Breadcrumbbar()
|
||||
{
|
||||
}
|
||||
|
||||
void BreadcrumbBar::clear_segments()
|
||||
void Breadcrumbbar::clear_segments()
|
||||
{
|
||||
m_segments.clear();
|
||||
remove_all_children();
|
||||
}
|
||||
|
||||
void BreadcrumbBar::append_segment(String text, const Gfx::Bitmap* icon, String data, String tooltip)
|
||||
void Breadcrumbbar::append_segment(String text, const Gfx::Bitmap* icon, String data, String tooltip)
|
||||
{
|
||||
auto& button = add<BreadcrumbButton>();
|
||||
button.set_button_style(Gfx::ButtonStyle::CoolBar);
|
||||
button.set_button_style(Gfx::ButtonStyle::Coolbar);
|
||||
button.set_text(text);
|
||||
button.set_icon(icon);
|
||||
button.set_tooltip(move(tooltip));
|
||||
@ -125,7 +125,7 @@ void BreadcrumbBar::append_segment(String text, const Gfx::Bitmap* icon, String
|
||||
m_segments.append(move(segment));
|
||||
}
|
||||
|
||||
void BreadcrumbBar::set_selected_segment(Optional<size_t> index)
|
||||
void Breadcrumbbar::set_selected_segment(Optional<size_t> index)
|
||||
{
|
||||
if (!index.has_value()) {
|
||||
for_each_child_of_type<GUI::AbstractButton>([&](auto& button) {
|
||||
@ -140,7 +140,7 @@ void BreadcrumbBar::set_selected_segment(Optional<size_t> index)
|
||||
segment.button->set_checked(true);
|
||||
}
|
||||
|
||||
void BreadcrumbBar::doubleclick_event(MouseEvent& event)
|
||||
void Breadcrumbbar::doubleclick_event(MouseEvent& event)
|
||||
{
|
||||
if (on_doubleclick)
|
||||
on_doubleclick(event);
|
@ -30,11 +30,11 @@
|
||||
|
||||
namespace GUI {
|
||||
|
||||
class BreadcrumbBar : public GUI::Widget {
|
||||
C_OBJECT(BreadcrumbBar);
|
||||
class Breadcrumbbar : public GUI::Widget {
|
||||
C_OBJECT(Breadcrumbbar);
|
||||
|
||||
public:
|
||||
virtual ~BreadcrumbBar() override;
|
||||
virtual ~Breadcrumbbar() override;
|
||||
|
||||
void clear_segments();
|
||||
void append_segment(String text, const Gfx::Bitmap* icon = nullptr, String data = {}, String tooltip = {});
|
||||
@ -51,7 +51,7 @@ public:
|
||||
Function<void(MouseEvent& event)> on_doubleclick;
|
||||
|
||||
private:
|
||||
BreadcrumbBar();
|
||||
Breadcrumbbar();
|
||||
|
||||
struct Segment {
|
||||
RefPtr<const Gfx::Bitmap> icon;
|
@ -49,7 +49,7 @@ Button::Button(String text)
|
||||
REGISTER_ENUM_PROPERTY(
|
||||
"button_style", button_style, set_button_style, Gfx::ButtonStyle,
|
||||
{ Gfx::ButtonStyle::Normal, "Normal" },
|
||||
{ Gfx::ButtonStyle::CoolBar, "CoolBar" });
|
||||
{ Gfx::ButtonStyle::Coolbar, "Coolbar" });
|
||||
}
|
||||
|
||||
Button::~Button()
|
||||
@ -77,7 +77,7 @@ void Button::paint_event(PaintEvent& event)
|
||||
|
||||
if (paint_pressed || is_checked()) {
|
||||
painter.translate(1, 1);
|
||||
} else if (m_icon && is_enabled() && is_hovered() && button_style() == Gfx::ButtonStyle::CoolBar) {
|
||||
} else if (m_icon && is_enabled() && is_hovered() && button_style() == Gfx::ButtonStyle::Coolbar) {
|
||||
auto shadow_color = palette().button().darkened(0.7f);
|
||||
painter.blit_filtered(icon_location.translated(1, 1), *m_icon, m_icon->rect(), [&shadow_color](auto) {
|
||||
return shadow_color;
|
||||
|
@ -12,7 +12,7 @@ set(SOURCES
|
||||
Application.cpp
|
||||
AutocompleteProvider.cpp
|
||||
BoxLayout.cpp
|
||||
BreadcrumbBar.cpp
|
||||
Breadcrumbbar.cpp
|
||||
Button.cpp
|
||||
Calendar.cpp
|
||||
CheckBox.cpp
|
||||
@ -56,7 +56,7 @@ set(SOURCES
|
||||
LinkLabel.cpp
|
||||
ListView.cpp
|
||||
Menu.cpp
|
||||
MenuBar.cpp
|
||||
Menubar.cpp
|
||||
MenuItem.cpp
|
||||
MessageBox.cpp
|
||||
Model.cpp
|
||||
@ -67,12 +67,12 @@ set(SOURCES
|
||||
OpacitySlider.cpp
|
||||
Painter.cpp
|
||||
ProcessChooser.cpp
|
||||
ProgressBar.cpp
|
||||
Progressbar.cpp
|
||||
RadioButton.cpp
|
||||
RegularEditingEngine.cpp
|
||||
ResizeCorner.cpp
|
||||
RunningProcessesModel.cpp
|
||||
ScrollBar.cpp
|
||||
Scrollbar.cpp
|
||||
ScrollableWidget.cpp
|
||||
SeparatorWidget.cpp
|
||||
Shortcut.cpp
|
||||
@ -81,14 +81,14 @@ set(SOURCES
|
||||
SpinBox.cpp
|
||||
Splitter.cpp
|
||||
StackWidget.cpp
|
||||
StatusBar.cpp
|
||||
Statusbar.cpp
|
||||
TabWidget.cpp
|
||||
TableView.cpp
|
||||
TextBox.cpp
|
||||
TextDocument.cpp
|
||||
TextEditor.cpp
|
||||
ToolBar.cpp
|
||||
ToolBarContainer.cpp
|
||||
Toolbar.cpp
|
||||
ToolbarContainer.cpp
|
||||
TreeView.cpp
|
||||
UndoStack.cpp
|
||||
Variant.cpp
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <LibGUI/ColumnsView.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGfx/CharacterBitmap.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <LibGUI/Desktop.h>
|
||||
#include <LibGUI/ListView.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGUI/Window.h>
|
||||
|
||||
|
@ -85,7 +85,7 @@ EmojiInputDialog::EmojiInputDialog(Window* parent_window)
|
||||
auto emoji_text = builder.to_string();
|
||||
auto& button = horizontal_container.add<Button>(emoji_text);
|
||||
button.set_min_size(16, 16);
|
||||
button.set_button_style(Gfx::ButtonStyle::CoolBar);
|
||||
button.set_button_style(Gfx::ButtonStyle::Coolbar);
|
||||
button.on_click = [this, button = &button](auto) {
|
||||
m_selected_emoji_text = button->text();
|
||||
done(ExecOK);
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <LibGUI/MultiView.h>
|
||||
#include <LibGUI/SortingProxyModel.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGUI/ToolBar.h>
|
||||
#include <LibGUI/Toolbar.h>
|
||||
#include <LibGfx/FontDatabase.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
#include <string.h>
|
||||
@ -104,7 +104,7 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, const StringView& file_
|
||||
if (!widget.load_from_gml(file_picker_dialog_gml))
|
||||
VERIFY_NOT_REACHED();
|
||||
|
||||
auto& toolbar = *widget.find_descendant_of_type_named<GUI::ToolBar>("toolbar");
|
||||
auto& toolbar = *widget.find_descendant_of_type_named<GUI::Toolbar>("toolbar");
|
||||
toolbar.set_has_frame(false);
|
||||
|
||||
m_location_textbox = *widget.find_descendant_of_type_named<GUI::TextBox>("location_textbox");
|
||||
|
@ -51,7 +51,7 @@
|
||||
name: "location_textbox"
|
||||
}
|
||||
|
||||
@GUI::ToolBar {
|
||||
@GUI::Toolbar {
|
||||
name: "toolbar"
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <LibGUI/FontPickerWeightModel.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/ListView.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibGfx/FontDatabase.h>
|
||||
|
||||
|
@ -58,7 +58,7 @@ class Label;
|
||||
class Layout;
|
||||
class ListView;
|
||||
class Menu;
|
||||
class MenuBar;
|
||||
class Menubar;
|
||||
class MenuItem;
|
||||
class Model;
|
||||
class ModelEditingDelegate;
|
||||
@ -73,14 +73,14 @@ class RadioButton;
|
||||
class ResizeCorner;
|
||||
class ResizeEvent;
|
||||
class ScreenRectChangeEvent;
|
||||
class ScrollBar;
|
||||
class Scrollbar;
|
||||
class ScrollableWidget;
|
||||
class Slider;
|
||||
class SortingProxyModel;
|
||||
class SpinBox;
|
||||
class Splitter;
|
||||
class StackWidget;
|
||||
class StatusBar;
|
||||
class Statusbar;
|
||||
class TabWidget;
|
||||
class TableView;
|
||||
class TextBox;
|
||||
@ -90,8 +90,8 @@ struct TextDocumentSpan;
|
||||
class TextDocumentUndoCommand;
|
||||
class TextEditor;
|
||||
class ThemeChangeEvent;
|
||||
class ToolBar;
|
||||
class ToolBarContainer;
|
||||
class Toolbar;
|
||||
class ToolbarContainer;
|
||||
class TreeView;
|
||||
class Variant;
|
||||
class VerticalBoxLayout;
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <LibGUI/IconView.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
|
||||
namespace GUI {
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <LibGUI/ListView.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
|
||||
REGISTER_WIDGET(GUI, ListView)
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
bool is_visible() const { return m_visible; }
|
||||
|
||||
private:
|
||||
friend class MenuBar;
|
||||
friend class Menubar;
|
||||
|
||||
int realize_menu(RefPtr<Action> default_action = nullptr);
|
||||
void unrealize_menu();
|
||||
|
@ -26,34 +26,34 @@
|
||||
|
||||
#include <AK/Badge.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/MenuItem.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/WindowServerConnection.h>
|
||||
|
||||
namespace GUI {
|
||||
|
||||
MenuBar::MenuBar()
|
||||
Menubar::Menubar()
|
||||
{
|
||||
}
|
||||
|
||||
MenuBar::~MenuBar()
|
||||
Menubar::~Menubar()
|
||||
{
|
||||
unrealize_menubar();
|
||||
}
|
||||
|
||||
Menu& MenuBar::add_menu(String name)
|
||||
Menu& Menubar::add_menu(String name)
|
||||
{
|
||||
auto& menu = add<Menu>(move(name));
|
||||
m_menus.append(menu);
|
||||
return menu;
|
||||
}
|
||||
|
||||
int MenuBar::realize_menubar()
|
||||
int Menubar::realize_menubar()
|
||||
{
|
||||
return WindowServerConnection::the().send_sync<Messages::WindowServer::CreateMenubar>()->menubar_id();
|
||||
}
|
||||
|
||||
void MenuBar::unrealize_menubar()
|
||||
void Menubar::unrealize_menubar()
|
||||
{
|
||||
if (m_menubar_id == -1)
|
||||
return;
|
||||
@ -61,7 +61,7 @@ void MenuBar::unrealize_menubar()
|
||||
m_menubar_id = -1;
|
||||
}
|
||||
|
||||
void MenuBar::notify_added_to_window(Badge<Window>)
|
||||
void Menubar::notify_added_to_window(Badge<Window>)
|
||||
{
|
||||
VERIFY(m_menubar_id == -1);
|
||||
m_menubar_id = realize_menubar();
|
||||
@ -73,7 +73,7 @@ void MenuBar::notify_added_to_window(Badge<Window>)
|
||||
}
|
||||
}
|
||||
|
||||
void MenuBar::notify_removed_from_window(Badge<Window>)
|
||||
void Menubar::notify_removed_from_window(Badge<Window>)
|
||||
{
|
||||
unrealize_menubar();
|
||||
}
|
@ -33,11 +33,11 @@
|
||||
|
||||
namespace GUI {
|
||||
|
||||
class MenuBar : public Core::Object {
|
||||
C_OBJECT(MenuBar);
|
||||
class Menubar : public Core::Object {
|
||||
C_OBJECT(Menubar);
|
||||
|
||||
public:
|
||||
~MenuBar();
|
||||
~Menubar();
|
||||
|
||||
Menu& add_menu(String name);
|
||||
|
||||
@ -47,7 +47,7 @@ public:
|
||||
int menubar_id() const { return m_menubar_id; }
|
||||
|
||||
private:
|
||||
MenuBar();
|
||||
Menubar();
|
||||
|
||||
int realize_menubar();
|
||||
void unrealize_menubar();
|
@ -27,16 +27,16 @@
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/ProgressBar.h>
|
||||
#include <LibGUI/Progressbar.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
|
||||
REGISTER_WIDGET(GUI, ProgressBar)
|
||||
REGISTER_WIDGET(GUI, VerticalProgressBar)
|
||||
REGISTER_WIDGET(GUI, HorizontalProgressBar)
|
||||
REGISTER_WIDGET(GUI, Progressbar)
|
||||
REGISTER_WIDGET(GUI, VerticalProgressbar)
|
||||
REGISTER_WIDGET(GUI, HorizontalProgressbar)
|
||||
|
||||
namespace GUI {
|
||||
|
||||
ProgressBar::ProgressBar(Orientation orientation)
|
||||
Progressbar::Progressbar(Orientation orientation)
|
||||
: m_orientation(orientation)
|
||||
{
|
||||
REGISTER_STRING_PROPERTY("text", text, set_text);
|
||||
@ -48,11 +48,11 @@ ProgressBar::ProgressBar(Orientation orientation)
|
||||
REGISTER_INT_PROPERTY("max", max, set_max);
|
||||
}
|
||||
|
||||
ProgressBar::~ProgressBar()
|
||||
Progressbar::~Progressbar()
|
||||
{
|
||||
}
|
||||
|
||||
void ProgressBar::set_value(int value)
|
||||
void Progressbar::set_value(int value)
|
||||
{
|
||||
if (m_value == value)
|
||||
return;
|
||||
@ -60,7 +60,7 @@ void ProgressBar::set_value(int value)
|
||||
update();
|
||||
}
|
||||
|
||||
void ProgressBar::set_range(int min, int max)
|
||||
void Progressbar::set_range(int min, int max)
|
||||
{
|
||||
VERIFY(min <= max);
|
||||
m_min = min;
|
||||
@ -68,7 +68,7 @@ void ProgressBar::set_range(int min, int max)
|
||||
m_value = clamp(m_value, m_min, m_max);
|
||||
}
|
||||
|
||||
void ProgressBar::paint_event(PaintEvent& event)
|
||||
void Progressbar::paint_event(PaintEvent& event)
|
||||
{
|
||||
Frame::paint_event(event);
|
||||
|
||||
@ -93,10 +93,10 @@ void ProgressBar::paint_event(PaintEvent& event)
|
||||
progress_text = builder.to_string();
|
||||
}
|
||||
|
||||
Gfx::StylePainter::paint_progress_bar(painter, rect, palette(), m_min, m_max, m_value, progress_text, m_orientation);
|
||||
Gfx::StylePainter::paint_progressbar(painter, rect, palette(), m_min, m_max, m_value, progress_text, m_orientation);
|
||||
}
|
||||
|
||||
void ProgressBar::set_orientation(Orientation value)
|
||||
void Progressbar::set_orientation(Orientation value)
|
||||
{
|
||||
if (m_orientation == value)
|
||||
return;
|
@ -30,10 +30,10 @@
|
||||
|
||||
namespace GUI {
|
||||
|
||||
class ProgressBar : public Frame {
|
||||
C_OBJECT(ProgressBar)
|
||||
class Progressbar : public Frame {
|
||||
C_OBJECT(Progressbar)
|
||||
public:
|
||||
virtual ~ProgressBar() override;
|
||||
virtual ~Progressbar() override;
|
||||
|
||||
void set_range(int min, int max);
|
||||
void set_min(int min) { set_range(min, max()); }
|
||||
@ -59,7 +59,7 @@ public:
|
||||
void set_format(Format format) { m_format = format; }
|
||||
|
||||
protected:
|
||||
ProgressBar(Orientation = Orientation::Horizontal);
|
||||
Progressbar(Orientation = Orientation::Horizontal);
|
||||
|
||||
virtual void paint_event(PaintEvent&) override;
|
||||
|
||||
@ -72,28 +72,28 @@ private:
|
||||
Orientation m_orientation { Orientation::Horizontal };
|
||||
};
|
||||
|
||||
class VerticalProgressBar final : public ProgressBar {
|
||||
C_OBJECT(VerticalProgressBar);
|
||||
class VerticalProgressbar final : public Progressbar {
|
||||
C_OBJECT(VerticalProgressbar);
|
||||
|
||||
public:
|
||||
virtual ~VerticalProgressBar() override { }
|
||||
virtual ~VerticalProgressbar() override { }
|
||||
|
||||
private:
|
||||
VerticalProgressBar()
|
||||
: ProgressBar(Orientation::Vertical)
|
||||
VerticalProgressbar()
|
||||
: Progressbar(Orientation::Vertical)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class HorizontalProgressBar final : public ProgressBar {
|
||||
C_OBJECT(HorizontalProgressBar);
|
||||
class HorizontalProgressbar final : public Progressbar {
|
||||
C_OBJECT(HorizontalProgressbar);
|
||||
|
||||
public:
|
||||
virtual ~HorizontalProgressBar() override { }
|
||||
virtual ~HorizontalProgressbar() override { }
|
||||
|
||||
private:
|
||||
HorizontalProgressBar()
|
||||
: ProgressBar(Orientation::Horizontal)
|
||||
HorizontalProgressbar()
|
||||
: Progressbar(Orientation::Horizontal)
|
||||
{
|
||||
}
|
||||
};
|
@ -24,21 +24,21 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/ScrollableWidget.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
|
||||
namespace GUI {
|
||||
|
||||
ScrollableWidget::ScrollableWidget()
|
||||
{
|
||||
m_vertical_scrollbar = add<ScrollableWidgetScrollBar>(*this, Orientation::Vertical);
|
||||
m_vertical_scrollbar = add<ScrollableWidgetScrollbar>(*this, Orientation::Vertical);
|
||||
m_vertical_scrollbar->set_step(4);
|
||||
m_vertical_scrollbar->on_change = [this](int) {
|
||||
did_scroll();
|
||||
update();
|
||||
};
|
||||
|
||||
m_horizontal_scrollbar = add<ScrollableWidgetScrollBar>(*this, Orientation::Horizontal);
|
||||
m_horizontal_scrollbar = add<ScrollableWidgetScrollbar>(*this, Orientation::Horizontal);
|
||||
m_horizontal_scrollbar->set_step(4);
|
||||
m_horizontal_scrollbar->set_page_step(30);
|
||||
m_horizontal_scrollbar->on_change = [this](int) {
|
||||
|
@ -27,7 +27,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <LibGUI/Frame.h>
|
||||
#include <LibGUI/ScrollBar.h>
|
||||
#include <LibGUI/Scrollbar.h>
|
||||
|
||||
namespace GUI {
|
||||
|
||||
@ -60,10 +60,10 @@ public:
|
||||
Gfx::IntSize available_size() const;
|
||||
Gfx::IntSize excess_size() const;
|
||||
|
||||
ScrollBar& vertical_scrollbar() { return *m_vertical_scrollbar; }
|
||||
const ScrollBar& vertical_scrollbar() const { return *m_vertical_scrollbar; }
|
||||
ScrollBar& horizontal_scrollbar() { return *m_horizontal_scrollbar; }
|
||||
const ScrollBar& horizontal_scrollbar() const { return *m_horizontal_scrollbar; }
|
||||
Scrollbar& vertical_scrollbar() { return *m_vertical_scrollbar; }
|
||||
const Scrollbar& vertical_scrollbar() const { return *m_vertical_scrollbar; }
|
||||
Scrollbar& horizontal_scrollbar() { return *m_horizontal_scrollbar; }
|
||||
const Scrollbar& horizontal_scrollbar() const { return *m_horizontal_scrollbar; }
|
||||
Widget& corner_widget() { return *m_corner_widget; }
|
||||
const Widget& corner_widget() const { return *m_corner_widget; }
|
||||
|
||||
@ -92,12 +92,12 @@ protected:
|
||||
void set_size_occupied_by_fixed_elements(const Gfx::IntSize&);
|
||||
|
||||
private:
|
||||
class ScrollableWidgetScrollBar final : public ScrollBar {
|
||||
C_OBJECT(ScrollableWidgetScrollBar);
|
||||
class ScrollableWidgetScrollbar final : public Scrollbar {
|
||||
C_OBJECT(ScrollableWidgetScrollbar);
|
||||
|
||||
protected:
|
||||
explicit ScrollableWidgetScrollBar(ScrollableWidget& owner, Gfx::Orientation orientation)
|
||||
: ScrollBar(orientation)
|
||||
explicit ScrollableWidgetScrollbar(ScrollableWidget& owner, Gfx::Orientation orientation)
|
||||
: Scrollbar(orientation)
|
||||
, m_owner(owner)
|
||||
{
|
||||
}
|
||||
@ -110,13 +110,13 @@ private:
|
||||
private:
|
||||
ScrollableWidget& m_owner;
|
||||
};
|
||||
friend class ScrollableWidgetScrollBar;
|
||||
friend class ScrollableWidgetScrollbar;
|
||||
|
||||
void update_scrollbar_ranges();
|
||||
void handle_wheel_event(MouseEvent&, Widget&);
|
||||
|
||||
RefPtr<ScrollableWidgetScrollBar> m_vertical_scrollbar;
|
||||
RefPtr<ScrollableWidgetScrollBar> m_horizontal_scrollbar;
|
||||
RefPtr<ScrollableWidgetScrollbar> m_vertical_scrollbar;
|
||||
RefPtr<ScrollableWidgetScrollbar> m_horizontal_scrollbar;
|
||||
RefPtr<Widget> m_corner_widget;
|
||||
Gfx::IntSize m_content_size;
|
||||
Gfx::IntSize m_size_occupied_by_fixed_elements;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user