taskbar: Add a button to open terminal instead of gclient
This commit is contained in:
parent
a4b5e68e1b
commit
5a49e97483
@ -31,18 +31,18 @@ Result<int> luna_main(int argc, char** argv)
|
|||||||
ui::HorizontalLayout layout(ui::AdjustHeight::Yes, ui::AdjustWidth::No);
|
ui::HorizontalLayout layout(ui::AdjustHeight::Yes, ui::AdjustWidth::No);
|
||||||
window->set_main_widget(layout);
|
window->set_main_widget(layout);
|
||||||
|
|
||||||
ui::Button start_button({ 0, 0, 50, 50 });
|
ui::Button term_button({ 0, 0, 50, 50 });
|
||||||
layout.add_widget(start_button);
|
layout.add_widget(term_button);
|
||||||
|
|
||||||
ui::Container start_container({ 0, 0, 50, 50 }, ui::VerticalAlignment::Center, ui::HorizontalAlignment::Center);
|
ui::Container term_container({ 0, 0, 50, 50 }, ui::VerticalAlignment::Center, ui::HorizontalAlignment::Center);
|
||||||
start_button.set_widget(start_container);
|
term_button.set_widget(term_container);
|
||||||
start_button.set_action([] {
|
term_button.set_action([] {
|
||||||
StringView args[] = { "/usr/bin/gclient" };
|
StringView args[] = { "/usr/bin/terminal" };
|
||||||
os::Process::spawn("/usr/bin/gclient", Slice<StringView> { args, 1 }, false);
|
os::Process::spawn("/usr/bin/terminal", Slice<StringView> { args, 1 }, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
auto start_image = TRY(ui::ImageWidget::load("/usr/share/icons/32x32/start-icon.tga"));
|
auto term_image = TRY(ui::ImageWidget::load("/usr/share/icons/32x32/app-terminal.tga"));
|
||||||
start_container.set_widget(*start_image);
|
term_container.set_widget(*term_image);
|
||||||
|
|
||||||
ui::Button about_button({ 0, 0, 50, 50 });
|
ui::Button about_button({ 0, 0, 50, 50 });
|
||||||
layout.add_widget(about_button);
|
layout.add_widget(about_button);
|
||||||
|
BIN
base/usr/share/icons/32x32/app-terminal.tga
Normal file
BIN
base/usr/share/icons/32x32/app-terminal.tga
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.0 KiB |
Loading…
Reference in New Issue
Block a user