Skip to content

Refine entry tooltips#346

Merged
eristhea merged 75 commits intoQuiltMC:develop/2.8from
supersaiyansubtlety:custom-layout
Feb 7, 2026
Merged

Refine entry tooltips#346
eristhea merged 75 commits intoQuiltMC:develop/2.8from
supersaiyansubtlety:custom-layout

Conversation

@supersaiyansubtlety
Copy link
Member

@supersaiyansubtlety supersaiyansubtlety commented Dec 8, 2025

based on #320 because both mess with editor panel scroll panes rebased

Improves entry tooltips:

  • uses a custom layout manager to handle multiple scroll panes in the tooltip
  • repaints the tooltip when populating; fixes artifacts from prior population when repacking doesn't trigger a repaint
  • makes the no package, synthetic and anonymous label texts translatable
  • prevents tooltips from overlapping with screen insets (no dock overlap)
  • fixes Tooltips get cut off when horizontal scrollbar is present #342 by accounting for scroll bar size in scroll panes' getPreferredSize methods
  • fixes selected text rendering for javadocs (transparent background was breaking it)
  • disables entry tooltip snippets when the decompiler is BYTECODE because snippet parsing only works on java source
  • rebase once Token type markers #320 is merged

FlexGridLayout

FlexGridLayout is the custom layout manager used in tooltips.
It's a general-purpose layout manager that aims to improve upon GridBagLayout; most notably it replaces weights with priority.
Its constraints are also much more programmer-friendly, IMO.
My hope is that it sees use throughout Enigma in the future.

The :enigma-swing:visualizeGui task allows opening various toy GUIs to visualize what GUI code is doing in lieu of a GUI test framework; currently it has a bunch of visualizations of various flex grid layouts.

@supersaiyansubtlety supersaiyansubtlety self-assigned this Dec 8, 2025
@supersaiyansubtlety supersaiyansubtlety added bug Something isn't working enhancement new feature or request user interface affects the enigma ui labels Dec 8, 2025
@supersaiyansubtlety supersaiyansubtlety force-pushed the custom-layout branch 2 times, most recently from 7d9e05f to b39f8f1 Compare December 10, 2025 02:20
@supersaiyansubtlety supersaiyansubtlety force-pushed the custom-layout branch 2 times, most recently from 1114c19 to 25596ce Compare December 12, 2025 22:57
.build()
);

this.repaint();
Copy link
Member Author

Choose a reason for hiding this comment

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

this may affect #337

Copy link
Member

Choose a reason for hiding this comment

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

the white box shown in #337 is now less noticeable, but i can still reliably reproduce

@eristhea eristhea self-requested a review January 16, 2026 17:05
@supersaiyansubtlety supersaiyansubtlety force-pushed the custom-layout branch 2 times, most recently from 92be5ee to 29fdbc8 Compare January 16, 2026 20:06
temporarily? hide horizontal scroll bars of DeclarationSnippetPanels
use FlexGridLayout in EntryTooltip
…n't intersect dock)

put post-click repopulating moving in SwingUtilities::invokeLater after re-pack so it positions based on updated size
…nd FlexGridLayout their own implementations

cleanup
@supersaiyansubtlety supersaiyansubtlety marked this pull request as ready for review January 27, 2026 21:27
@supersaiyansubtlety
Copy link
Member Author

ready!

Copy link
Member

@eristhea eristhea left a comment

Choose a reason for hiding this comment

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

amazing work, this new layout is going to be so useful

final Point oldMousePos = MouseInfo.getPointerInfo().getLocation();
this.declarationSnippet.addSourceSetListener(source -> {
this.pack();
// swing </3
Copy link
Member

Choose a reason for hiding this comment

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

swing ❤️‍🩹

.build()
);

this.repaint();
Copy link
Member

Choose a reason for hiding this comment

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

the white box shown in #337 is now less noticeable, but i can still reliably reproduce

supersaiyansubtlety and others added 2 commits February 6, 2026 19:49
Co-authored-by: ix0rai <ix0rai64@gmail.com>
@eristhea eristhea merged commit 7f45b4f into QuiltMC:develop/2.8 Feb 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement new feature or request user interface affects the enigma ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tooltips get cut off when horizontal scrollbar is present

2 participants