From ca2803fe73cd4685f93e1f3bb99e2e6ae58a2c9f Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 7 Feb 2025 19:54:00 +0100 Subject: [PATCH] Gallery: Dummy menu bar Add dummy menu bar in the gallery since the gallery should ideally show all widgets, including a menu bar --- examples/gallery/gallery.slint | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/examples/gallery/gallery.slint b/examples/gallery/gallery.slint index d3bc925ae09..2e8804a4fdf 100644 --- a/examples/gallery/gallery.slint +++ b/examples/gallery/gallery.slint @@ -14,6 +14,27 @@ export component App inherits Window { title: @tr("Slint Widgets Gallery"); icon: @image-url("../../logo/slint-logo-small-light.png"); + MenuBar { + MenuItem { + title: @tr("MenuBar" => "File"); + MenuItem { title: @tr("MenuBar" => "Open"); } + MenuItem { + title: @tr("MenuBar" => "Open Recent"); + for x in 10: MenuItem { title: @tr("MenuBar" => "Recent {}", x+1); } + } + MenuItem { title: @tr("MenuBar" => "Save"); } + MenuItem { + title: @tr("MenuBar" => "Save As"); + for x in 10: MenuItem { title: @tr("MenuBar" => "Name {}", x+1); } + } + } + MenuItem { + title: @tr("MenuBar" => "Edit"); + MenuItem { title: @tr("MenuBar" => "Copy"); } + MenuItem { title: @tr("MenuBar" => "Paste"); } + } + } + HorizontalLayout { side-bar := SideBar { title: @tr("Slint Widgets Gallery");