mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 19:07:35 +00: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
6 changed files with 8 additions and 6 deletions
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 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) {
|
for (auto& new_file_action : m_new_file_actions) {
|
||||||
new_file_submenu.add_action(new_file_action);
|
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_action(*m_new_plain_file_action);
|
||||||
new_file_submenu.add_separator();
|
new_file_submenu.add_separator();
|
||||||
new_file_submenu.add_action(*m_new_directory_action);
|
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)
|
for (auto& file : files)
|
||||||
open_file(file);
|
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);
|
open_selected_action->set_enabled(true);
|
||||||
return open_selected_action;
|
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()
|
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)
|
if (m_all_editor_wrappers.size() <= 1)
|
||||||
return;
|
return;
|
||||||
auto wrapper = m_current_editor_wrapper;
|
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()
|
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();
|
auto widget = m_action_tab_widget->active_widget();
|
||||||
if (!widget)
|
if (!widget)
|
||||||
return;
|
return;
|
||||||
|
@ -758,7 +760,7 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_remove_current_terminal_acti
|
||||||
NonnullRefPtr<GUI::Action> HackStudioWidget::create_add_editor_action()
|
NonnullRefPtr<GUI::Action> HackStudioWidget::create_add_editor_action()
|
||||||
{
|
{
|
||||||
return GUI::Action::create("Add New &Editor", { Mod_Ctrl | Mod_Alt, Key_E },
|
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&) {
|
[this](auto&) {
|
||||||
add_new_editor(*m_editors_splitter);
|
add_new_editor(*m_editors_splitter);
|
||||||
update_actions();
|
update_actions();
|
||||||
|
@ -768,7 +770,7 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_add_editor_action()
|
||||||
NonnullRefPtr<GUI::Action> HackStudioWidget::create_add_terminal_action()
|
NonnullRefPtr<GUI::Action> HackStudioWidget::create_add_terminal_action()
|
||||||
{
|
{
|
||||||
return GUI::Action::create("Add New &Terminal", { Mod_Ctrl | Mod_Alt, Key_T },
|
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&) {
|
[this](auto&) {
|
||||||
auto& terminal_wrapper = m_action_tab_widget->add_tab<TerminalWrapper>("Terminal");
|
auto& terminal_wrapper = m_action_tab_widget->add_tab<TerminalWrapper>("Terminal");
|
||||||
reveal_action_tab(terminal_wrapper);
|
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) {
|
for (auto& new_file_action : m_new_file_actions) {
|
||||||
new_submenu.add_action(new_file_action);
|
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_action(*m_new_plain_file_action);
|
||||||
new_submenu.add_separator();
|
new_submenu.add_separator();
|
||||||
new_submenu.add_action(*m_new_directory_action);
|
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/"));
|
m_paste_action->set_enabled(is_editable() && Clipboard::the().fetch_mime_type().starts_with("text/"));
|
||||||
if (is_multi_line()) {
|
if (is_multi_line()) {
|
||||||
m_go_to_line_action = Action::create(
|
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;
|
String value;
|
||||||
if (InputBox::show(window(), value, "Line:", "Go to line") == InputBox::ExecOK) {
|
if (InputBox::show(window(), value, "Line:", "Go to line") == InputBox::ExecOK) {
|
||||||
auto line_target = value.to_uint();
|
auto line_target = value.to_uint();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue