Skip to content

Dockable UI#2

Closed
ckaiser wants to merge 22 commits into
dacap:dockfrom
ckaiser:dock-and-roll
Closed

Dockable UI#2
ckaiser wants to merge 22 commits into
dacap:dockfrom
ckaiser:dock-and-roll

Conversation

@ckaiser

@ckaiser ckaiser commented Jan 31, 2025

Copy link
Copy Markdown

Here we are! First draft of the finished Dock & Dockable UI

Some things to finish:

  • Take care of all the TODOs.
  • Do more thorough testing with importing older configurations.
  • Improve the logic of how Dockables know where they're docked (aka make the logic).
  • More documentation/comments.
  • Art/theming/icon pass.
  • Testing with popular user themes.

Bonus things:

  • Tried to auto-hide the m_actionButton in the LayoutSelector::LayoutItem and then only show it when hovering over the item, but I could NOT get it to work reliably.
  • Adding the functionality to get widgets to draw themselves onto a surface that we can then draw elsewhere could be useful for one of the TODOs and also maybe other things in future.

@dacap dacap self-assigned this Feb 7, 2025
@dacap

dacap commented Feb 8, 2025

Copy link
Copy Markdown
Owner

@ckaiser I've just rebased my dock branch and cherry-picked the extra commit from dock-handles (should be equivalent to what you used as base in 466a6aa). You can try rebasing your patch to the new dock head and target this PR to the dock branch, in this way I can make comments to your patch only.

@dacap

dacap commented Feb 8, 2025

Copy link
Copy Markdown
Owner

There are several direct TRACE() calls which would be better to remove them from the patch, or make a conditional TRACE (e.g. like in other files MENU_TRACE, CMD_TRACE, etc.)

@dacap dacap assigned ckaiser and unassigned dacap Feb 8, 2025
@ckaiser ckaiser changed the base branch from beta to dock February 8, 2025 19:43
@ckaiser

ckaiser commented Feb 8, 2025

Copy link
Copy Markdown
Author

Rebased and removed some of the superfluous TRACE(), only one that might be relevant is when the layout fails to load which I changed to warning log.

@ckaiser ckaiser removed their assignment Feb 8, 2025
@dacap dacap self-assigned this Feb 18, 2025

@dacap dacap left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far so good, I'm making a first set of review comments so you can make some changes, but I'll require more time (or probably merge it after these fixes and continue from there).

Comment thread src/app/ui/dock.cpp Outdated
Comment thread src/app/ui/dock.cpp
Comment thread src/app/ui/dock.h
Comment thread src/app/ui/dock.cpp
Comment thread src/app/ui/dock.cpp Outdated
Comment thread src/app/ui/layouts.cpp Outdated
Comment thread src/app/ui/tabs.cpp Outdated
Comment thread src/app/ui/timeline/timeline.h Outdated
Comment thread src/app/ui/dock.cpp Outdated
Comment thread src/app/ui/layout_selector.cpp Outdated
Comment thread src/app/ui/dock.cpp Outdated
@dacap dacap assigned ckaiser and unassigned dacap Feb 19, 2025
@ckaiser ckaiser removed their assignment Feb 28, 2025
@ckaiser ckaiser requested a review from dacap February 28, 2025 11:47
dacap and others added 14 commits March 31, 2025 12:18
…te#518)

Some missing features so far:

1) Restore old layout configuration (color bar split pos, timeline
   pos, etc.) and migrate to new Dock layout
2) Load/saving Dock layout
3) Create & customize current layoout (drag-and-drop widgets, etc.)
Temporary/created subdocks must be deleted automatically, and children
that are not part of the window hierarchy must be deleted explicitly
now (using some std::unique_ptrs).
Changes:
* Now we use the "user data" icon as the button to expand the layouts
  combobox
* Added a tooltip to this icon
* Added buttons to configure the Timeline position in the same
  combobox
* Fixed some bugs in Dock using space for hidden widgets
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.
And now we store the TiXmlElement for each Layout, instead of
converting from/to text back and forth.
dacap and others added 8 commits March 31, 2025 12:18
This patch includes:

* The layout is updated immediately when docks are resized (before
  this the layout was like a snapshot of the configuration when the
  layout was created or overwritten with the "New Layout" option)
* Saving the active layout used in
  preferences.general.workspace_layout so we can restore it after
  restarting Aseprite
* Change "UI Layout" to "Workspace Layout"
* Some strings moved to en.ini file for i18n
* Fixed a crash on MainWindow::onActiveViewChange() when the
  application was being closed
This was a new issue with combination of
9b90159, probably we should close the
popup when the window is resized (instead of onSizeHint()).
@dacap dacap closed this Apr 26, 2025
dacap pushed a commit that referenced this pull request Apr 26, 2025
@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 #2
@dacap

dacap commented Apr 26, 2025

Copy link
Copy Markdown
Owner

Merged squashed in c6ae828 with some notes about the changes in the commit description.

dacap pushed a commit that referenced this pull request May 1, 2025
@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 #2
dacap pushed a commit that referenced this pull request Jul 7, 2025
@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 #2
dacap pushed a commit that referenced this pull request Jul 29, 2025
@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 #2
dacap pushed a commit that referenced this pull request Aug 4, 2025
@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 #2
@ckaiser ckaiser deleted the dock-and-roll branch September 10, 2025 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants