Add layouts + dockable UI#3485
Conversation
0b3acea to
b595aae
Compare
aseprite-bot
left a comment
There was a problem hiding this comment.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 79. Check the log or trigger a new build to see more.
| { | ||
| } | ||
|
|
||
| bool ToggleWorkspaceLayoutCommand::onChecked(Context* ctx) |
There was a problem hiding this comment.
warning: parameter 'ctx' is unused [misc-unused-parameters]
| bool ToggleWorkspaceLayoutCommand::onChecked(Context* ctx) | |
| bool ToggleWorkspaceLayoutCommand::onChecked(Context* /*ctx*/) |
| ->isSelectorVisible(); | ||
| } | ||
|
|
||
| void ToggleWorkspaceLayoutCommand::onExecute(Context* ctx) |
There was a problem hiding this comment.
warning: parameter 'ctx' is unused [misc-unused-parameters]
| void ToggleWorkspaceLayoutCommand::onExecute(Context* ctx) | |
| void ToggleWorkspaceLayoutCommand::onExecute(Context* /*ctx*/) |
|
|
||
| int selITem = m_box->position()->selectedItem(); | ||
| switch (selITem) { | ||
| int selItem = option; |
There was a problem hiding this comment.
warning: variable 'selItem' of type 'int' can be declared 'const' [misc-const-correctness]
| int selItem = option; | |
| int const selItem = option; |
|
|
||
| InitTheme.connect( | ||
| [this]{ | ||
| if (auto p = parent()) |
There was a problem hiding this comment.
warning: 'auto p' can be declared as 'auto *p' [readability-qualified-auto]
| if (auto p = parent()) | |
| if (auto *p = parent()) |
| initTheme(); | ||
| } | ||
|
|
||
| void Dock::resetDocks() |
There was a problem hiding this comment.
warning: function 'resetDocks' is within a recursive call chain [misc-no-recursion]
void Dock::resetDocks()
^Additional context
src/app/ui/dock.cpp:108: example recursive call chain, starting from function 'resetDocks'
void Dock::resetDocks()
^src/app/ui/dock.cpp:115: Frame #1: function 'resetDocks' calls function 'resetDocks' here:
subdock->resetDocks();
^src/app/ui/dock.cpp:115: ... which was the starting point of the recursive call chain; there may be other cycles
subdock->resetDocks();
^| int i = side_index(side); | ||
| // Only EXPANSIVE sides can be user-defined (has a splitter so the | ||
| // user can expand or shrink it) | ||
| if (m_aligns[i] & EXPANSIVE) |
There was a problem hiding this comment.
warning: implicit conversion 'unsigned int' -> bool [readability-implicit-bool-conversion]
| if (m_aligns[i] & EXPANSIVE) | |
| if ((m_aligns[i] & EXPANSIVE) != 0u) |
| else | ||
| return gfx::Size(); |
There was a problem hiding this comment.
warning: do not use 'else' after 'return' [readability-else-after-return]
| else | |
| return gfx::Size(); | |
| return gfx::Size(); |
|
|
||
| Dock* Dock::subdock(int side) | ||
| { | ||
| int i = side_index(side); |
There was a problem hiding this comment.
warning: variable 'i' of type 'int' can be declared 'const' [misc-const-correctness]
| int i = side_index(side); | |
| int const i = side_index(side); |
| Dock* Dock::subdock(int side) | ||
| { | ||
| int i = side_index(side); | ||
| if (auto subdock = dynamic_cast<Dock*>(m_sides[i])) |
There was a problem hiding this comment.
warning: 'auto subdock' can be declared as 'auto *subdock' [readability-qualified-auto]
| if (auto subdock = dynamic_cast<Dock*>(m_sides[i])) | |
| if (auto *subdock = dynamic_cast<Dock*>(m_sides[i])) |
| if (auto subdock = dynamic_cast<Dock*>(m_sides[i])) | ||
| return subdock; | ||
|
|
||
| auto oldWidget = m_sides[i]; |
There was a problem hiding this comment.
warning: 'auto oldWidget' can be declared as 'auto *oldWidget' [readability-qualified-auto]
| auto oldWidget = m_sides[i]; | |
| auto *oldWidget = m_sides[i]; |
aseprite-bot
left a comment
There was a problem hiding this comment.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 54. Check the log or trigger a new build to see more.
| return subdock; | ||
|
|
||
| auto oldWidget = m_sides[i]; | ||
| auto newSubdock = new Dock; |
There was a problem hiding this comment.
warning: 'auto newSubdock' can be declared as 'auto *newSubdock' [readability-qualified-auto]
| auto newSubdock = new Dock; | |
| auto *newSubdock = new Dock; |
| forEachSide(bounds, | ||
| [bounds](ui::Widget* widget, | ||
| const gfx::Rect& widgetBounds, | ||
| const gfx::Rect& separator, |
There was a problem hiding this comment.
warning: parameter 'separator' is unused [misc-unused-parameters]
| const gfx::Rect& separator, | |
| const gfx::Rect& /*separator*/, |
| [bounds](ui::Widget* widget, | ||
| const gfx::Rect& widgetBounds, | ||
| const gfx::Rect& separator, | ||
| const int index) { |
There was a problem hiding this comment.
warning: parameter 'index' is unused [misc-unused-parameters]
| const int index) { | |
| const int /*index*/) { |
| m_capturedSide = -1; | ||
| forEachSide(childrenBounds(), | ||
| [this, pos](ui::Widget* widget, | ||
| const gfx::Rect& widgetBounds, |
There was a problem hiding this comment.
warning: parameter 'widgetBounds' is unused [misc-unused-parameters]
| const gfx::Rect& widgetBounds, | |
| const gfx::Rect& /*widgetBounds*/, |
| const gfx::Point pos = static_cast<MouseMessage*>(msg)->position(); | ||
| ui::CursorType cursor = ui::kArrowCursor; | ||
| forEachSide(childrenBounds(), | ||
| [pos, &cursor](ui::Widget* widget, |
There was a problem hiding this comment.
warning: parameter 'widget' is unused [misc-unused-parameters]
| [pos, &cursor](ui::Widget* widget, | |
| [pos, &cursor](ui::Widget* /*widget*/, |
| (m_aligns[i] & EXPANSIVE ? childSpacing(): 0); | ||
|
|
||
| const gfx::Size sz = | ||
| (m_aligns[i] & EXPANSIVE ? m_sizes[i]: widget->sizeHint()); |
There was a problem hiding this comment.
warning: implicit conversion 'unsigned int' -> bool [readability-implicit-bool-conversion]
| (m_aligns[i] & EXPANSIVE ? m_sizes[i]: widget->sizeHint()); | |
| ((m_aligns[i] & EXPANSIVE) != 0u ? m_sizes[i]: widget->sizeHint()); |
| int whichSideChildIsDocked(const ui::Widget* widget) const; | ||
| gfx::Size getUserDefinedSizeAtSide(int side) const; | ||
|
|
||
| obs::signal<void()> Resize; |
There was a problem hiding this comment.
warning: member variable 'Resize' has public visibility [misc-non-private-member-variables-in-classes]
obs::signal<void()> Resize;
^| gfx::Size getUserDefinedSizeAtSide(int side) const; | ||
|
|
||
| obs::signal<void()> Resize; | ||
| obs::signal<void()> UserResizedDock; |
There was a problem hiding this comment.
warning: member variable 'UserResizedDock' has public visibility [misc-non-private-member-variables-in-classes]
obs::signal<void()> UserResizedDock;
^| void onUserResizedDock(); | ||
|
|
||
| private: | ||
| void setSide(const int i, ui::Widget* newWidget); |
There was a problem hiding this comment.
warning: parameter 'i' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
| void setSide(const int i, ui::Widget* newWidget); | |
| void setSide(int i, ui::Widget* newWidget); |
|
|
||
| private: | ||
| void setSide(const int i, ui::Widget* newWidget); | ||
| int calcAlign(const int i); |
There was a problem hiding this comment.
warning: parameter 'i' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
| int calcAlign(const int i); | |
| int calcAlign(int i); |
aseprite-bot
left a comment
There was a problem hiding this comment.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 26. Check the log or trigger a new build to see more.
| const int index)> f); | ||
|
|
||
| bool hasVisibleSide(const int i) const { | ||
| return (m_sides[i] && m_sides[i]->isVisible()); |
There was a problem hiding this comment.
warning: implicit conversion 'value_type' (aka 'ui::Widget *') -> bool [readability-implicit-bool-conversion]
| return (m_sides[i] && m_sides[i]->isVisible()); | |
| return ((m_sides[i] != nullptr) && m_sides[i]->isVisible()); |
| } | ||
| } | ||
|
|
||
| static void load_dock_layout(const XMLElement* elem, Dock* dock) |
There was a problem hiding this comment.
warning: function 'load_dock_layout' is within a recursive call chain [misc-no-recursion]
static void load_dock_layout(const XMLElement* elem, Dock* dock)
^Additional context
src/app/ui/layout.cpp:71: example recursive call chain, starting from function 'load_dock_layout'
static void load_dock_layout(const XMLElement* elem, Dock* dock)
^src/app/ui/layout.cpp:111: Frame #1: function 'load_dock_layout' calls function 'load_dock_layout' here:
load_dock_layout(childElem, subdock);
^src/app/ui/layout.cpp:111: ... which was the starting point of the recursive call chain; there may be other cycles
load_dock_layout(childElem, subdock);
^| Dock* subdock = nullptr; | ||
|
|
||
| int side = ui::CENTER; | ||
| if (auto sideStr = elem->Attribute("side")) { |
There was a problem hiding this comment.
warning: 'auto sideStr' can be declared as 'const auto *sideStr' [readability-qualified-auto]
| if (auto sideStr = elem->Attribute("side")) { | |
| if (const auto *sideStr = elem->Attribute("side")) { |
| else if (elemName == "dock") { subdock = dock->subdock(side); } | ||
|
|
||
| if (subdock) { | ||
| auto childElem = elem->FirstChildElement(); |
There was a problem hiding this comment.
warning: 'auto childElem' can be declared as 'const auto *childElem' [readability-qualified-auto]
| auto childElem = elem->FirstChildElement(); | |
| const auto *childElem = elem->FirstChildElement(); |
| LayoutPtr Layout::MakeFromXmlElement(const XMLElement* layoutElem) | ||
| { | ||
| auto layout = std::make_shared<Layout>(); | ||
| if (auto name = layoutElem->Attribute("name")) { |
There was a problem hiding this comment.
warning: 'auto name' can be declared as 'const auto *name' [readability-qualified-auto]
| if (auto name = layoutElem->Attribute("name")) { | |
| if (const auto *name = layoutElem->Attribute("name")) { |
| m_customizableDockPlaceholder = std::make_unique<Widget>(); | ||
| m_customizableDockPlaceholder->addChild(m_customizableDock); | ||
| m_customizableDockPlaceholder->InitTheme.connect([this]{ | ||
| auto theme = static_cast<skin::SkinTheme*>(this->theme()); |
There was a problem hiding this comment.
warning: 'auto theme' can be declared as 'auto *theme' [readability-qualified-auto]
| auto theme = static_cast<skin::SkinTheme*>(this->theme()); | |
| auto *theme = static_cast<skin::SkinTheme*>(this->theme()); |
| align = HORIZONTAL; | ||
| invertWidgets = true; | ||
| side = ui::LEFT; | ||
| w = (workspaceBounds.w * (1.0-timelineSplitterPos)) / guiscale(); |
There was a problem hiding this comment.
warning: narrowing conversion from 'double' to 'int' [bugprone-narrowing-conversions]
w = (workspaceBounds.w * (1.0-timelineSplitterPos)) / guiscale();
^| case gen::TimelinePosition::RIGHT: | ||
| align = HORIZONTAL; | ||
| side = ui::RIGHT; | ||
| w = (workspaceBounds.w * (1.0-timelineSplitterPos)) / guiscale(); |
There was a problem hiding this comment.
warning: narrowing conversion from 'double' to 'int' [bugprone-narrowing-conversions]
w = (workspaceBounds.w * (1.0-timelineSplitterPos)) / guiscale();
^| break; | ||
| case gen::TimelinePosition::BOTTOM: | ||
| side = ui::BOTTOM; | ||
| h = (workspaceBounds.h * (1.0-timelineSplitterPos)) / guiscale(); |
There was a problem hiding this comment.
warning: narrowing conversion from 'double' to 'int' [bugprone-narrowing-conversions]
h = (workspaceBounds.h * (1.0-timelineSplitterPos)) / guiscale();
^| Rect rc = getToolGroupBounds(group_index); | ||
| int w = 0; | ||
|
|
||
| int w = borderWidth; |
There was a problem hiding this comment.
warning: variable 'w' of type 'int' can be declared 'const' [misc-const-correctness]
| int w = borderWidth; | |
| int const w = borderWidth; |
aseprite-bot
left a comment
There was a problem hiding this comment.
clang-tidy made some suggestions
| Point arrow = (tool ? getToolPositionInGroup(group_index, tool): Point(0, 0)); | ||
| if (tool && m_popupWindow && m_popupWindow->isVisible()) | ||
| toolrc.x += arrow.x - m_popupWindow->bounds().w; | ||
| Point arrow = (tool ? getToolPositionInGroup(tool): Point(0, 0)); |
There was a problem hiding this comment.
warning: variable 'arrow' of type 'Point' (aka 'PointT') can be declared 'const' [misc-const-correctness]
| Point arrow = (tool ? getToolPositionInGroup(tool): Point(0, 0)); | |
| Point const arrow = (tool ? getToolPositionInGroup(tool): Point(0, 0)); |
aseprite-bot
left a comment
There was a problem hiding this comment.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 83. Check the log or trigger a new build to see more.
| { | ||
| } | ||
|
|
||
| bool ToggleWorkspaceLayoutCommand::onChecked(Context* ctx) |
There was a problem hiding this comment.
warning: parameter 'ctx' is unused [misc-unused-parameters]
| bool ToggleWorkspaceLayoutCommand::onChecked(Context* ctx) | |
| bool ToggleWorkspaceLayoutCommand::onChecked(Context* /*ctx*/) |
| return App::instance()->mainWindow()->layoutSelector()->isSelectorVisible(); | ||
| } | ||
|
|
||
| void ToggleWorkspaceLayoutCommand::onExecute(Context* ctx) |
There was a problem hiding this comment.
warning: parameter 'ctx' is unused [misc-unused-parameters]
| void ToggleWorkspaceLayoutCommand::onExecute(Context* ctx) | |
| void ToggleWorkspaceLayoutCommand::onExecute(Context* /*ctx*/) |
|
|
||
| int selITem = m_box->position()->selectedItem(); | ||
| switch (selITem) { | ||
| int selItem = option; |
There was a problem hiding this comment.
warning: variable 'selItem' of type 'int' can be declared 'const' [misc-const-correctness]
| int selItem = option; | |
| int const selItem = option; |
| int selITem = m_box->position()->selectedItem(); | ||
| switch (selITem) { | ||
| int selItem = option; | ||
| switch (selItem) { |
There was a problem hiding this comment.
warning: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case]
switch (selItem) {
^|
|
||
| namespace { | ||
|
|
||
| enum { kTopIndex, kBottomIndex, kLeftIndex, kRightIndex, kCenterIndex }; |
There was a problem hiding this comment.
warning: enum '(unnamed enum at /github/workspace/src/app/ui/dock.cpp:31:1)' uses a larger base type ('unsigned int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
enum { kTopIndex, kBottomIndex, kLeftIndex, kRightIndex, kCenterIndex };
^| } | ||
| } | ||
|
|
||
| void Dock::undock(Widget* widget) |
There was a problem hiding this comment.
warning: function 'undock' is within a recursive call chain [misc-no-recursion]
void Dock::undock(Widget* widget)
^Additional context
src/app/ui/dock.cpp:183: example recursive call chain, starting from function 'undock'
void Dock::undock(Widget* widget)
^src/app/ui/dock.cpp:200: Frame #1: function 'undock' calls function 'undock' here:
undock(parentDock);
^src/app/ui/dock.cpp:200: ... which was the starting point of the recursive call chain; there may be other cycles
undock(parentDock);
^| if (!parent) | ||
| return; // Already undocked | ||
|
|
||
| if (auto parentDock = dynamic_cast<Dock*>(parent)) { |
There was a problem hiding this comment.
warning: 'auto parentDock' can be declared as 'auto *parentDock' [readability-qualified-auto]
| if (auto parentDock = dynamic_cast<Dock*>(parent)) { | |
| if (auto *parentDock = dynamic_cast<Dock*>(parent)) { |
| undock(parentDock); | ||
| } | ||
| } | ||
| else if (auto parentTabs = dynamic_cast<DockTabs*>(parent)) { |
There was a problem hiding this comment.
warning: 'auto parentTabs' can be declared as 'auto *parentTabs' [readability-qualified-auto]
| else if (auto parentTabs = dynamic_cast<DockTabs*>(parent)) { | |
| else if (auto *parentTabs = dynamic_cast<DockTabs*>(parent)) { |
|
|
||
| gfx::Size Dock::getUserDefinedSizeAtSide(int side) const | ||
| { | ||
| int i = side_index(side); |
There was a problem hiding this comment.
warning: variable 'i' of type 'int' can be declared 'const' [misc-const-correctness]
| int i = side_index(side); | |
| int const i = side_index(side); |
| int i = side_index(side); | ||
| // Only EXPANSIVE sides can be user-defined (has a splitter so the | ||
| // user can expand or shrink it) | ||
| if (m_aligns[i] & EXPANSIVE) |
There was a problem hiding this comment.
warning: implicit conversion 'unsigned int' -> 'bool' [readability-implicit-bool-conversion]
| if (m_aligns[i] & EXPANSIVE) | |
| if ((m_aligns[i] & EXPANSIVE) != 0u) |
aseprite-bot
left a comment
There was a problem hiding this comment.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 77. Check the log or trigger a new build to see more.
| initTheme(); | ||
| } | ||
|
|
||
| void Dock::setCustomizing(bool enable, bool doLayout) |
There was a problem hiding this comment.
warning: function 'setCustomizing' is within a recursive call chain [misc-no-recursion]
void Dock::setCustomizing(bool enable, bool doLayout)
^Additional context
src/app/ui/dock.cpp:101: example recursive call chain, starting from function 'setCustomizing'
void Dock::setCustomizing(bool enable, bool doLayout)
^src/app/ui/dock.cpp:110: Frame #1: function 'setCustomizing' calls function 'setCustomizing' here:
subdock->setCustomizing(enable, false);
^src/app/ui/dock.cpp:110: ... which was the starting point of the recursive call chain; there may be other cycles
subdock->setCustomizing(enable, false);
^| m_customizing = enable; | ||
|
|
||
| for (int i = 0; i < kSides; ++i) { | ||
| auto child = m_sides[i]; |
There was a problem hiding this comment.
warning: 'auto child' can be declared as 'auto *child' [readability-qualified-auto]
| auto child = m_sides[i]; | |
| auto *child = m_sides[i]; |
| auto child = m_sides[i]; | ||
| if (!child) | ||
| continue; | ||
| else if (auto subdock = dynamic_cast<Dock*>(child)) |
There was a problem hiding this comment.
warning: 'auto subdock' can be declared as 'auto *subdock' [readability-qualified-auto]
else if (auto subdock = dynamic_cast<Dock*>(child))
^this fix will not be applied because it overlaps with another fix
| if (!child) | ||
| continue; | ||
| else if (auto subdock = dynamic_cast<Dock*>(child)) | ||
| subdock->setCustomizing(enable, false); |
There was a problem hiding this comment.
warning: do not use 'else' after 'continue' [readability-else-after-return]
| subdock->setCustomizing(enable, false); | |
| if (auto subdock = dynamic_cast<Dock*>(child)) | |
| subdock->setCustomizing(enable, false); |
| layout(); | ||
| } | ||
|
|
||
| void Dock::resetDocks() |
There was a problem hiding this comment.
warning: function 'resetDocks' is within a recursive call chain [misc-no-recursion]
void Dock::resetDocks()
^Additional context
src/app/ui/dock.cpp:117: example recursive call chain, starting from function 'resetDocks'
void Dock::resetDocks()
^src/app/ui/dock.cpp:124: Frame #1: function 'resetDocks' calls function 'resetDocks' here:
subdock->resetDocks();
^src/app/ui/dock.cpp:124: ... which was the starting point of the recursive call chain; there may be other cycles
subdock->resetDocks();
^| auto rc = widgetBounds; | ||
| auto th = textHeight(); | ||
| if (isCustomizing()) { | ||
| auto theme = SkinTheme::get(this); |
There was a problem hiding this comment.
warning: 'auto theme' can be declared as 'auto *theme' [readability-qualified-auto]
| auto theme = SkinTheme::get(this); | |
| auto *theme = SkinTheme::get(this); |
| auto theme = SkinTheme::get(this); | ||
| auto color = theme->colors.workspaceText(); | ||
| int handleSide = 0; | ||
| if (auto dockable = dynamic_cast<Dockable*>(widget)) |
There was a problem hiding this comment.
warning: 'auto dockable' can be declared as 'auto *dockable' [readability-qualified-auto]
| if (auto dockable = dynamic_cast<Dockable*>(widget)) | |
| if (auto *dockable = dynamic_cast<Dockable*>(widget)) |
| int handleSide = 0; | ||
| if (auto dockable = dynamic_cast<Dockable*>(widget)) | ||
| handleSide = dockable->dockHandleSide(); | ||
| switch (handleSide) { |
There was a problem hiding this comment.
warning: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case]
switch (handleSide) {
^| const gfx::Point pos = static_cast<MouseMessage*>(msg)->position(); | ||
| gfx::Size& sz = m_sizes[m_hit.sideIndex]; | ||
|
|
||
| switch (m_hit.sideIndex) { |
There was a problem hiding this comment.
warning: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case]
switch (m_hit.sideIndex) {
^| m_hit = calcHit(pos); | ||
|
|
||
| if (m_hit.sideIndex >= 0) { | ||
| switch (m_hit.sideIndex) { |
There was a problem hiding this comment.
warning: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case]
switch (m_hit.sideIndex) {
^55590bd to
ec60773
Compare
|
The initial iteration of this feature is quite ready to be tested. Still some minor things to be fixed (and a lot of room of improvement to dock widgets in other parts, and sub-divide widgets like the ColorBar), but it's a good start for a first iteration. |
ckaiser
left a comment
There was a problem hiding this comment.
Gave it a test and found an issue, when modifying the default theme, closing the app and re-opening it again, the modifications aren't applied, only when I open the dropdown and re-select "Default*" do my layout changes show up. The rest is looking good!
Had some minor string stuff in the comments and usability thoughts:
New icon looks good! I'm wondering if it should have some kind of toggle state beyond just the dropdown appearing?
Another thing that I was thinking about was if it'd be wise to automatically hide the dropdown & docking handles, because I can definitely see a user clicking on it and then just leaving it on for the rest of the session. It's not a big deal since it doesn't persist, but yeah maybe opening/closing a file, losing focus or switching tabs could hide it?
| modified = {} (Modified) | ||
| deleting_layout = Deleting Layout | ||
| deleting_layout_confirmation = Are you sure you want to delete the layout '{}'? | ||
| restoring_layout = "Restoring Layout" |
There was a problem hiding this comment.
| restoring_layout = "Restoring Layout" | |
| restoring_layout = Restoring Layout |
| 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?" |
There was a problem hiding this comment.
| restoring_layout_confirmation = Are you sure you want to restore the {} layout?" | |
| restoring_layout_confirmation = Are you sure you want to restore the '{}' layout? |
| <vbox> | ||
| <grid columns="2"> | ||
| <label text="@.base" /> | ||
| <combobox id="base" expansive="true"> |
There was a problem hiding this comment.
I feel like this dialogue should probably have some kind of explainer/help text either in a tooltip or in a help button or something, just to make sure the concept of a "base" layout is understood since it's a pretty programmer-y thing.
There was a problem hiding this comment.
I'm not sure if the "base" field is even necessary. From the user point of view, creating a new layout will be based on the "actual look" of the UI (the actual layout). Not sure what effect has the "base" layout to the new user layout. Could we just remove this field?
There was a problem hiding this comment.
Yeah now that I think about it, it's a relic from when you had to make a new layout to modify the default ones - better off without it, simpler.
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'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
This improves the look of the flag as another icon above the tabs bottom and at the right of the layout selector icon.
* Better support to load legacy timeline information: we have to estimate workspace bounds) * Auto-save layouts after resizing a splitter/dock * Fix resetting expansive widgets inside docks after switching tabs * Load mirrored layout correctly if it was the last selected layout
With this patch we've also simplified some hacks handling the populateComboBox() call, deferring the deletion of widgets/items when we are inside an event generated by those items.
Without this, the combobox is still visible and clicking the button again will crash the program.
We're going to keep this section for a couple of versions as old users get used to the new Workspace Layout customization. The "Position" section will contain the layout icon so we can switch the Workspace Layout combobox from there too,
|
I've just updated |
This is a work-in-progress. We want to add multiple ways to customize the layout/workspace #518