diff --git a/Applications/Launcher/main.cpp b/Applications/Launcher/main.cpp index 4d3829da1b..e204ce0c33 100644 --- a/Applications/Launcher/main.cpp +++ b/Applications/Launcher/main.cpp @@ -65,24 +65,27 @@ private: GWindow* make_launcher_window() { auto config = CConfigFile::get_for_app("Launcher"); + auto vertical = config->read_bool_entry("Launcher", "vertical", true); auto* window = new GWindow; window->set_title("Launcher"); - window->set_rect(50, 50, 50, config->groups().size() * 50); + int launcher_size = config->groups().size() * 50; + window->set_rect(50, 50, vertical ? 50 : launcher_size, vertical ? launcher_size : 50); window->set_show_titlebar(false); auto* widget = new GWidget; widget->set_fill_with_background_color(true); - widget->set_layout(make(Orientation::Vertical)); + widget->set_layout(make(vertical ? Orientation::Vertical : Orientation::Horizontal)); widget->layout()->set_spacing(0); widget->layout()->set_margins({ 5, 0, 5, 0 }); window->set_main_widget(widget); for (auto& group : config->groups()) { - new LauncherButton(config->read_entry(group, "Name", group), - config->read_entry(group, "Icon", ""), - config->read_entry(group, "Path", ""), - widget); + if (group != "Launcher") + new LauncherButton(config->read_entry(group, "Name", group), + config->read_entry(group, "Icon", ""), + config->read_entry(group, "Path", ""), + widget); } return window; diff --git a/Base/home/anon/Launcher.ini b/Base/home/anon/Launcher.ini index 6d45911b0e..5e3cf8ba8d 100644 --- a/Base/home/anon/Launcher.ini +++ b/Base/home/anon/Launcher.ini @@ -1,3 +1,6 @@ +[Launcher] +vertical=false + [Terminal] Path=/bin/Terminal Icon=/res/icons/Terminal.png