mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
Base+HackStudio: Add or insert missing icons
Insert or add icons where they are missing.
This commit is contained in:
parent
19d4f52a9e
commit
3c11dc5bd3
Notes:
sideshowbarker
2024-07-17 19:04:06 +09:00
Author: https://github.com/electrikmilk Commit: https://github.com/SerenityOS/serenity/commit/3c11dc5bd3 Pull-request: https://github.com/SerenityOS/serenity/pull/12370
BIN
Base/res/icons/hackstudio/add-editor.png
Normal file
BIN
Base/res/icons/hackstudio/add-editor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
Base/res/icons/hackstudio/add-terminal.png
Normal file
BIN
Base/res/icons/hackstudio/add-terminal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
Base/res/icons/hackstudio/remove-editor.png
Normal file
BIN
Base/res/icons/hackstudio/remove-editor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
Base/res/icons/hackstudio/remove-terminal.png
Normal file
BIN
Base/res/icons/hackstudio/remove-terminal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
@ -408,6 +408,7 @@ NonnullRefPtr<GUI::Menu> HackStudioWidget::create_project_tree_view_context_menu
|
||||
for (auto& new_file_action : m_new_file_actions) {
|
||||
new_file_submenu.add_action(new_file_action);
|
||||
}
|
||||
new_file_submenu.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/new.png").release_value_but_fixme_should_propagate_errors());
|
||||
new_file_submenu.add_action(*m_new_plain_file_action);
|
||||
new_file_submenu.add_separator();
|
||||
new_file_submenu.add_action(*m_new_directory_action);
|
||||
@ -500,6 +501,7 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_open_selected_action()
|
||||
for (auto& file : files)
|
||||
open_file(file);
|
||||
});
|
||||
open_selected_action->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/open.png").release_value_but_fixme_should_propagate_errors());
|
||||
open_selected_action->set_enabled(true);
|
||||
return open_selected_action;
|
||||
}
|
||||
@ -653,7 +655,7 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_switch_to_previous_editor_ac
|
||||
|
||||
NonnullRefPtr<GUI::Action> HackStudioWidget::create_remove_current_editor_action()
|
||||
{
|
||||
return GUI::Action::create("&Remove Current Editor", { Mod_Alt | Mod_Shift, Key_E }, [this](auto&) {
|
||||
return GUI::Action::create("&Remove Current Editor", { Mod_Alt | Mod_Shift, Key_E }, Gfx::Bitmap::try_load_from_file("/res/icons/hackstudio/remove-editor.png").release_value_but_fixme_should_propagate_errors(), [this](auto&) {
|
||||
if (m_all_editor_wrappers.size() <= 1)
|
||||
return;
|
||||
auto wrapper = m_current_editor_wrapper;
|
||||
@ -741,7 +743,7 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_save_as_action()
|
||||
|
||||
NonnullRefPtr<GUI::Action> HackStudioWidget::create_remove_current_terminal_action()
|
||||
{
|
||||
return GUI::Action::create("Remove &Current Terminal", { Mod_Alt | Mod_Shift, Key_T }, [this](auto&) {
|
||||
return GUI::Action::create("Remove &Current Terminal", { Mod_Alt | Mod_Shift, Key_T }, Gfx::Bitmap::try_load_from_file("/res/icons/hackstudio/remove-terminal.png").release_value_but_fixme_should_propagate_errors(), [this](auto&) {
|
||||
auto widget = m_action_tab_widget->active_widget();
|
||||
if (!widget)
|
||||
return;
|
||||
@ -758,7 +760,7 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_remove_current_terminal_acti
|
||||
NonnullRefPtr<GUI::Action> HackStudioWidget::create_add_editor_action()
|
||||
{
|
||||
return GUI::Action::create("Add New &Editor", { Mod_Ctrl | Mod_Alt, Key_E },
|
||||
Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-text-editor.png").release_value_but_fixme_should_propagate_errors(),
|
||||
Gfx::Bitmap::try_load_from_file("/res/icons/hackstudio/add-editor.png").release_value_but_fixme_should_propagate_errors(),
|
||||
[this](auto&) {
|
||||
add_new_editor(*m_editors_splitter);
|
||||
update_actions();
|
||||
@ -768,7 +770,7 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_add_editor_action()
|
||||
NonnullRefPtr<GUI::Action> HackStudioWidget::create_add_terminal_action()
|
||||
{
|
||||
return GUI::Action::create("Add New &Terminal", { Mod_Ctrl | Mod_Alt, Key_T },
|
||||
Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-terminal.png").release_value_but_fixme_should_propagate_errors(),
|
||||
Gfx::Bitmap::try_load_from_file("/res/icons/hackstudio/add-terminal.png").release_value_but_fixme_should_propagate_errors(),
|
||||
[this](auto&) {
|
||||
auto& terminal_wrapper = m_action_tab_widget->add_tab<TerminalWrapper>("Terminal");
|
||||
reveal_action_tab(terminal_wrapper);
|
||||
@ -1158,7 +1160,7 @@ void HackStudioWidget::create_project_menu(GUI::Window& window)
|
||||
for (auto& new_file_action : m_new_file_actions) {
|
||||
new_submenu.add_action(new_file_action);
|
||||
}
|
||||
|
||||
new_submenu.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/new.png").release_value_but_fixme_should_propagate_errors());
|
||||
new_submenu.add_action(*m_new_plain_file_action);
|
||||
new_submenu.add_separator();
|
||||
new_submenu.add_action(*m_new_directory_action);
|
||||
|
@ -88,7 +88,7 @@ void TextEditor::create_actions()
|
||||
m_paste_action->set_enabled(is_editable() && Clipboard::the().fetch_mime_type().starts_with("text/"));
|
||||
if (is_multi_line()) {
|
||||
m_go_to_line_action = Action::create(
|
||||
"Go to line...", { Mod_Ctrl, Key_L }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-forward.png").release_value_but_fixme_should_propagate_errors(), [this](auto&) {
|
||||
"Go to line...", { Mod_Ctrl, Key_L }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-to.png").release_value_but_fixme_should_propagate_errors(), [this](auto&) {
|
||||
String value;
|
||||
if (InputBox::show(window(), value, "Line:", "Go to line") == InputBox::ExecOK) {
|
||||
auto line_target = value.to_uint();
|
||||
|
Loading…
Reference in New Issue
Block a user