From 88e3c2a48c9e1eb30a034634ba87f05ed0f1f91d Mon Sep 17 00:00:00 2001 From: Christian Kaiser Date: Thu, 30 Jan 2025 10:19:22 -0300 Subject: [PATCH] Polish layout handling @dacap's notes: A description of the included changes: * Improve UX auto-saving layouts when docks are modified, and new 'X' icon to delete layouts (or reset the 'Default' layout). * Remove old timeline position controls (Left/Right/Bottom buttons) from the Timeline configuration and from the layout selector * Add support to drag and drop docks to other sides with real-time feedback using a semi-transparent UILayer * Add a context menu w/right-click to dock the widget at the supported sides without drag-and-drop Some review comments in https://github.com/dacap/aseprite/pull/2 --- data/strings/en.ini | 13 +- data/widgets/new_layout.xml | 14 +- data/widgets/timeline_conf.xml | 49 +-- src/app/ui/configure_timeline_popup.cpp | 24 -- src/app/ui/configure_timeline_popup.h | 2 - src/app/ui/dock.cpp | 468 +++++++++++++++--------- src/app/ui/dock.h | 37 +- src/app/ui/icon_button.cpp | 4 +- src/app/ui/layout.cpp | 55 ++- src/app/ui/layout.h | 10 +- src/app/ui/layout_selector.cpp | 441 ++++++++++++++-------- src/app/ui/layout_selector.h | 20 +- src/app/ui/layouts.cpp | 63 +++- src/app/ui/layouts.h | 4 + src/app/ui/main_window.cpp | 132 +++---- src/app/ui/main_window.h | 2 +- src/app/ui/tabs.cpp | 5 +- src/app/ui/workspace_tabs.h | 4 + src/ui/combobox.h | 1 + 19 files changed, 856 insertions(+), 492 deletions(-) diff --git a/data/strings/en.ini b/data/strings/en.ini index f4e401fa7..ac7f0a9c6 100644 --- a/data/strings/en.ini +++ b/data/strings/en.ini @@ -1245,8 +1245,19 @@ default_new_layer_name = New Layer [new_layout] title = New Workspace Layout +base = Base: name = Name: -default_name = User Layout {} +modified = {} (Modified) +deleting_layout = Deleting Layout +deleting_layout_confirmation = Are you sure you want to delete the layout '{}'? +restoring_layout = "Restoring Layout" +restoring_layout_confirmation = Are you sure you want to restore the {} layout?" + +[dock] +left = Dock Left +right = Dock Right +top = Dock Top +bottom = Dock Bottom [news_listbox] more = More... diff --git a/data/widgets/new_layout.xml b/data/widgets/new_layout.xml index 3e8adf845..3b17d0f66 100644 --- a/data/widgets/new_layout.xml +++ b/data/widgets/new_layout.xml @@ -3,15 +3,21 @@ - + + + + -