Skip to content

Commit

Permalink
Merge pull request #355 from devoxx/issue-354
Browse files Browse the repository at this point in the history
Fix #354 : Use min/max proportion in splitter
  • Loading branch information
stephanj authored Dec 9, 2024
2 parents ad7e20d + 724987f commit f4c2e0b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
public class DevoxxGenieToolWindowContent implements SettingsChangeListener {

private static final float SPLITTER_PROPORTION = 0.75f;
private static final float MIN_PROPORTION = 0.3f;
private static final float MAX_PROPORTION = 0.85f;

@Getter
private final Project project;
Expand Down Expand Up @@ -117,11 +119,11 @@ private void setupListeners() {

/**
* Create the splitter.
*
* @return the splitter
*/
private @NotNull Splitter createSplitter() {
OnePixelSplitter splitter = new OnePixelSplitter(true, SPLITTER_PROPORTION);
OnePixelSplitter splitter =
new OnePixelSplitter(true, SPLITTER_PROPORTION, MIN_PROPORTION, MAX_PROPORTION);
splitter.setFirstComponent(promptOutputPanel);
splitter.setSecondComponent(submitPanel);
splitter.setHonorComponentsMinimumSize(true);
Expand All @@ -130,7 +132,6 @@ private void setupListeners() {

/**
* Set up the message bus connection.
*
* @param toolWindow the tool window
*/
private void setupMessageBusConnection(@NotNull ToolWindow toolWindow) {
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/devoxx/genie/ui/panel/SubmitPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public SubmitPanel(DevoxxGenieToolWindowContent toolWindowContent)
add(submitPanel);
}

@Override
public Dimension getMinimumSize() {
return new Dimension(0, 150);
}

/**
* The bottom action buttons panel (Submit, Search buttons and Add Files)
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Mon Dec 09 18:57:18 CET 2024
#Mon Dec 09 19:24:31 CET 2024
version=0.4.1

0 comments on commit f4c2e0b

Please sign in to comment.