From 5a49e9748346de027d5564917e51dec796a35ec4 Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 16 Sep 2023 11:41:51 +0200 Subject: [PATCH] taskbar: Add a button to open terminal instead of gclient --- apps/taskbar.cpp | 18 +++++++++--------- base/usr/share/icons/32x32/app-terminal.tga | Bin 0 -> 4140 bytes base/usr/share/icons/32x32/start-icon.tga | Bin 4140 -> 0 bytes 3 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 base/usr/share/icons/32x32/app-terminal.tga delete mode 100644 base/usr/share/icons/32x32/start-icon.tga diff --git a/apps/taskbar.cpp b/apps/taskbar.cpp index 81679d52..9283d6e6 100644 --- a/apps/taskbar.cpp +++ b/apps/taskbar.cpp @@ -31,18 +31,18 @@ Result luna_main(int argc, char** argv) ui::HorizontalLayout layout(ui::AdjustHeight::Yes, ui::AdjustWidth::No); window->set_main_widget(layout); - ui::Button start_button({ 0, 0, 50, 50 }); - layout.add_widget(start_button); + ui::Button term_button({ 0, 0, 50, 50 }); + layout.add_widget(term_button); - ui::Container start_container({ 0, 0, 50, 50 }, ui::VerticalAlignment::Center, ui::HorizontalAlignment::Center); - start_button.set_widget(start_container); - start_button.set_action([] { - StringView args[] = { "/usr/bin/gclient" }; - os::Process::spawn("/usr/bin/gclient", Slice { args, 1 }, false); + ui::Container term_container({ 0, 0, 50, 50 }, ui::VerticalAlignment::Center, ui::HorizontalAlignment::Center); + term_button.set_widget(term_container); + term_button.set_action([] { + StringView args[] = { "/usr/bin/terminal" }; + os::Process::spawn("/usr/bin/terminal", Slice { args, 1 }, false); }); - auto start_image = TRY(ui::ImageWidget::load("/usr/share/icons/32x32/start-icon.tga")); - start_container.set_widget(*start_image); + auto term_image = TRY(ui::ImageWidget::load("/usr/share/icons/32x32/app-terminal.tga")); + term_container.set_widget(*term_image); ui::Button about_button({ 0, 0, 50, 50 }); layout.add_widget(about_button); diff --git a/base/usr/share/icons/32x32/app-terminal.tga b/base/usr/share/icons/32x32/app-terminal.tga new file mode 100644 index 0000000000000000000000000000000000000000..44f522d8d6324a909bd9b79dc5962f767746a479 GIT binary patch literal 4140 zcmeH`&kBGb42MTg(y>dug@F(S{iFAP5z}I~=}terY%(O1zWKR`I^yUlj)9+SHUq5< zgi293XNd1=WUho7?8L~$$4}P~Hz2dfPi$}vDj!^f%5QmoFk9`vauk+05x##m%IJpw{?7GzqpBBD%zX- literal 0 HcmV?d00001 diff --git a/base/usr/share/icons/32x32/start-icon.tga b/base/usr/share/icons/32x32/start-icon.tga deleted file mode 100644 index cad6cf31deff1d7a54858c629730377d39dab439..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4140 zcmeH{OA5j;5QYa&;?j-YqC!9v)QWqLB{zWiqnn8$+?g|#cd%C+17Va-X$>-({E|nr|xA}_` z0L}}3|NLG6USY?6`^-gd&&~Nt{@-|gh?{Ewj--eF|GXJIxAxt6Afz|ftmnva!&+O6o}A@e=XyL+@0yS7B~D8WaalDjPVTXo(Oh(fC_hrK%@Sd3 Wwe<-+@8j@Fk94~p-{*80PV@sfuqD6%