From dc51ca25e0ab57cabc205cd80bda458522b21661 Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 25 Aug 2022 16:31:42 -0300 Subject: [PATCH] Add option to save/restore user-defined layouts on memory This happens only in memory at the moment (layouts are not saved in disk yet), and the customization is quite simple (only size of splitters, timeline position). But in the future we should be able to dock elements in any place. --- data/strings/en.ini | 5 + data/widgets/new_layout.xml | 21 ++++ src/app/CMakeLists.txt | 1 + src/app/ui/dock.cpp | 31 ++++++ src/app/ui/dock.h | 4 + src/app/ui/layout.cpp | 181 +++++++++++++++++++++++++++++++++ src/app/ui/layout.h | 35 +++++++ src/app/ui/layout_selector.cpp | 131 +++++++++++++++++++----- src/app/ui/layout_selector.h | 10 ++ src/app/ui/main_window.cpp | 21 ++++ src/app/ui/main_window.h | 8 +- 11 files changed, 420 insertions(+), 28 deletions(-) create mode 100644 data/widgets/new_layout.xml create mode 100644 src/app/ui/layout.cpp create mode 100644 src/app/ui/layout.h diff --git a/data/strings/en.ini b/data/strings/en.ini index 991335f44..8ba606993 100644 --- a/data/strings/en.ini +++ b/data/strings/en.ini @@ -1236,6 +1236,11 @@ name = Name: tileset = Tileset: default_new_layer_name = New Layer +[new_layout] +title = New UI Layout +name = Name: +default_name = User Layout + [news_listbox] more = More... problem_loading = Problems loading news. Please retry. diff --git a/data/widgets/new_layout.xml b/data/widgets/new_layout.xml new file mode 100644 index 000000000..5ad98cace --- /dev/null +++ b/data/widgets/new_layout.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + +