Skip to content

Implement Label buddies#5356

Merged
dacap merged 1 commit into
aseprite:betafrom
ckaiser:label-buddies
Sep 10, 2025
Merged

Implement Label buddies#5356
dacap merged 1 commit into
aseprite:betafrom
ckaiser:label-buddies

Conversation

@ckaiser

@ckaiser ckaiser commented Aug 15, 2025

Copy link
Copy Markdown
Member

Implements Label "buddies", so that clicking on a label that's attached to another widget will focus said widget, similar to the HTML for property.

The PR adds the implementation and also adds one to every label that benefits from it, this required minor changes in some places (adding setId calls when there were placeholder widgets and adjusting some hierarchies so the buddy was easy to find with findChild, which also simplifies markup).

Examples:

Recording.2025-08-15.060335.mp4

@ckaiser ckaiser requested a review from dacap as a code owner August 15, 2025 09:07

@aseprite-bot aseprite-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread src/ui/label.cpp Outdated
@aseprite-bot

Copy link
Copy Markdown
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

@dacap dacap left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great so far! Some minor changes are required 👍

Comment thread data/widgets/duplicate_sprite.xml
Comment thread data/widgets/dynamics.xml
Comment thread data/widgets/dynamics.xml Outdated
Comment thread data/widgets/dynamics.xml
Comment thread src/app/commands/cmd_new_layer.cpp Outdated
Comment thread src/ui/label.cpp Outdated
@dacap dacap assigned ckaiser and unassigned dacap Sep 4, 2025

@aseprite-bot aseprite-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread src/ui/message.h
class FocusMessage : public Message {
public:
FocusMessage(MessageType type, Widget* oldFocus, Widget* newFocus)
enum class Source {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

warning: enum 'Source' uses a larger base type ('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 class Source {
             ^

@ckaiser ckaiser assigned dacap and unassigned ckaiser Sep 6, 2025

@dacap dacap left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks great now 👍

@dacap dacap merged commit f494b8f into aseprite:beta Sep 10, 2025
12 checks passed
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.

3 participants