Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockable dialogs #420

Draft
wants to merge 26 commits into
base: master
Choose a base branch
from
Draft

Conversation

2xsaiko
Copy link
Collaborator

@2xsaiko 2xsaiko commented Jul 5, 2021

image

@@ -114,6 +113,16 @@
private final JTabbedPane openFiles;
private final HashBiMap<ClassEntry, EditorPanel> editors = HashBiMap.create();

private final WorkspaceRPanelContainer workspace = new WorkspaceRPanelContainer();

private final RPanel structureRPanel;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this just be named structurePanel?

Copy link
Member

Choose a reason for hiding this comment

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

There's also the actual structure panel in a field called structurePanel, so probably not.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yup, I just picked the next best name I could think of, one of these (or both) will be renamed because all the other RPanels are just named *Panel

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

there, now it's just structurePanel ;)

Copy link
Contributor

@YanisBft YanisBft left a comment

Choose a reason for hiding this comment

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

Looks so good, glad you finally PRed it!

A few first-look things I noticed:

  • Language does not change on click on RPanels unlike the rest of the UI
  • Width of RPanels cannot be adjusted: it's the width of the text inside. This leads to very wide panels when the editor is not empty, and very thin otherwise
  • Drag and drop doesn't work for me (yet I assume?)
  • Details but the little java icons on every panel is a bit too much imo. Could be changed with proper icons or removed (JFrame.setIconImage)

@2xsaiko
Copy link
Collaborator Author

2xsaiko commented Jul 5, 2021

  • Language does not change on click on RPanels unlike the rest of the UI

yep, RPanel.setTitle seems to be broken, I didn't 100% test it since I had to add it in during the rebase (the original version of this code was written before on-the-fly language change was a thing)

  • Width of RPanels cannot be adjusted: it's the width of the text inside. This leads to very wide panels when the editor is not empty, and very thin otherwise

WorkspaceRPanelContainer which is supposed to handle this is very WIP, I just started actually implementing it today

  • Drag and drop doesn't work for me (yet I assume?)

Yep, will have to see how to do that, especially dropping windows back into the main frame, I don't think it's something that Swing has anything preexisting (or at least documented) for, like pretty much any of what I'm doing here (hell, just look at RotationLayerUI, the entire class is just to rotate the buttons and I had to go through obscure StackOverflow questions to manage to put something together that actually works)

Worst comes to worst, I'll have a menu on the panel that allows you to move it around like in IntelliJ but I'd really rather not because that's abysmal. I basically want to replicate how these work in Qt because the Qt dockable dialogs are great.

  • Details but the little java icons on every panel is a bit too much imo. Could be changed with proper icons or removed (JFrame.setIconImage)

Yup, the icon is going away, it's definitely unnecessary (edit: depends on the theme, it isn't there in the first place with Metal so I never noticed it originally)

@2xsaiko 2xsaiko force-pushed the feature/customizable-ui branch 2 times, most recently from f0632eb to d4c7314 Compare July 8, 2021 14:44
@2xsaiko 2xsaiko linked an issue Jul 8, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow hiding panels
4 participants