Skip to content

Commit 2d2adc7

Browse files
authored
Merge pull request #26 from uc4w6c/feat/redesign_toolwindow
fix: change the background of the input panel
2 parents 0053262 + bf59d7f commit 2d2adc7

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pluginGroup = com.github.uc4w6c.bedrockassistant
44
pluginName = BedrockAssistant
55
pluginRepositoryUrl = https://github.com/uc4w6c/BedrockAssistant
66
# SemVer format -> https://semver.org
7-
pluginVersion = 0.2.1
7+
pluginVersion = 0.2.2
88

99
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1010
pluginSinceBuild = 242

src/main/java/com/github/uc4w6c/bedrockassistant/action/AnalyzeCodeAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
5050
}
5151

5252
ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);
53-
ToolWindow toolWindow = toolWindowManager.getToolWindow("BedrockAssistantToolWindow");
53+
ToolWindow toolWindow = toolWindowManager.getToolWindow("BedrockAssistant");
5454
if (toolWindow == null) {
5555
throw new RuntimeException();
5656
}

src/main/java/com/github/uc4w6c/bedrockassistant/window/BedrockAssistantToolWindow.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.github.uc4w6c.bedrockassistant.window.component.MessagePanel;
44
import com.intellij.icons.AllIcons;
55
import com.intellij.openapi.application.ApplicationManager;
6+
import com.intellij.ui.JBColor;
67
import com.intellij.ui.components.JBTextArea;
78
import com.intellij.util.ui.JBUI;
89
import org.apache.commons.lang3.StringUtils;
@@ -56,7 +57,13 @@ public void componentResized(ComponentEvent componentEvent) {
5657
inputArea.setLineWrap(true);
5758
inputArea.setWrapStyleWord(true);
5859
inputArea.setRows(5);
60+
inputArea.setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY, 2));
61+
inputArea.setBackground(JBColor.WHITE);
62+
5963
sendButton = new JButton("Send");
64+
sendButton.setBackground(JBColor.BLUE);
65+
sendButton.setFocusPainted(false);
66+
6067
sendButton.addActionListener(actionEvent -> {
6168
if (StringUtils.isBlank(inputArea.getText())) {
6269
return;
@@ -73,9 +80,12 @@ public void componentResized(ComponentEvent componentEvent) {
7380

7481
JPanel inputPanel = new JPanel(new BorderLayout());
7582
inputPanel.setBorder(BorderFactory.createEmptyBorder());
83+
inputPanel.setBackground(JBColor.LIGHT_GRAY);
7684
inputPanel.add(inputArea, BorderLayout.NORTH);
85+
7786
JPanel sendButtonPanel = new JPanel(new BorderLayout());
7887
sendButtonPanel.add(sendButton, BorderLayout.EAST);
88+
sendButtonPanel.setBackground(JBColor.LIGHT_GRAY);
7989
inputPanel.add(sendButtonPanel, BorderLayout.SOUTH);
8090

8191
mainPanel.add(conversationScrollPane, BorderLayout.CENTER);

src/main/resources/META-INF/plugin.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<extensions defaultExtensionNs="com.intellij">
1212
<toolWindow
1313
factoryClass="com.github.uc4w6c.bedrockassistant.window.BedrockAssistantToolWindowFactory"
14-
id="BedrockAssistantToolWindow"
14+
id="BedrockAssistant"
15+
displayName="BedrockAssistant"
1516
anchor="right"/>
1617
<applicationConfigurable
1718
parentId="tools"

0 commit comments

Comments
 (0)