Skip to content

Commit 2b6c732

Browse files
committed
remove ACR admin button's background color
1 parent d6e54a4 commit 2b6c732

File tree

2 files changed

+11
-25
lines changed

2 files changed

+11
-25
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/helpers/containerregistry/ContainerRegistryPropertyView.form

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,7 @@
207207
<text value="&lt;Loading...&gt;"/>
208208
</properties>
209209
</component>
210-
<grid id="d7639" binding="pnlAdminUserBtn" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="true" same-size-vertically="true" hgap="-1" vgap="-1">
211-
<margin top="0" left="0" bottom="0" right="0"/>
210+
<grid id="d7639" binding="pnlAdminUserBtn" layout-manager="BorderLayout" hgap="0" vgap="0">
212211
<constraints>
213212
<grid row="6" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="8" fill="2" indent="0" use-parent-layout="false"/>
214213
</constraints>
@@ -218,24 +217,18 @@
218217
</properties>
219218
<border type="none"/>
220219
<children>
221-
<component id="747fd" class="javax.swing.JButton" binding="btnDisable">
222-
<constraints>
223-
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
224-
</constraints>
220+
<component id="dea5" class="javax.swing.JButton" binding="btnEnable">
221+
<constraints border-constraint="West"/>
225222
<properties>
226223
<margin top="0" left="0" bottom="0" right="0"/>
227-
<text value="Disable"/>
224+
<text value="Enable"/>
228225
</properties>
229226
</component>
230-
<component id="dea5" class="javax.swing.JButton" binding="btnEnable">
231-
<constraints>
232-
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false">
233-
<preferred-size width="47" height="32"/>
234-
</grid>
235-
</constraints>
227+
<component id="747fd" class="javax.swing.JButton" binding="btnDisable">
228+
<constraints border-constraint="Center"/>
236229
<properties>
237230
<margin top="0" left="0" bottom="0" right="0"/>
238-
<text value="Enable"/>
231+
<text value="Disable"/>
239232
</properties>
240233
</component>
241234
</children>

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/helpers/containerregistry/ContainerRegistryPropertyView.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030

3131
import org.jetbrains.annotations.NotNull;
3232

33-
import java.awt.Color;
34-
import java.awt.event.ActionEvent;
35-
3633
import javax.swing.BorderFactory;
3734
import javax.swing.JButton;
3835
import javax.swing.JComponent;
@@ -43,12 +40,10 @@
4340
public class ContainerRegistryPropertyView extends BaseEditor implements ContainerRegistryPropertyMvpView {
4441

4542
public static final String ID = ContainerRegistryPropertyView.class.getName();
46-
private static final Color COLOR_CHOSEN = new Color(191, 238, 251);
47-
private static final Color COLOR_UNCHOSEN = null;
4843

4944
private final ContainerRegistryPropertyViewPresenter<ContainerRegistryPropertyView> containerPropertyPresenter;
5045

51-
boolean isAdminEnabled;
46+
private boolean isAdminEnabled;
5247
private String registryId = "";
5348
private String subscriptionId = "";
5449
private String password = "";
@@ -97,11 +92,11 @@ public ContainerRegistryPropertyView() {
9792
}
9893
});
9994

100-
btnEnable.addActionListener(this::onAdminUserBtnClick);
101-
btnDisable.addActionListener(this::onAdminUserBtnClick);
95+
btnEnable.addActionListener(actionEvent -> onAdminUserBtnClick());
96+
btnDisable.addActionListener(actionEvent -> onAdminUserBtnClick());
10297
}
10398

104-
private void onAdminUserBtnClick(ActionEvent actionEvent) {
99+
private void onAdminUserBtnClick() {
105100
btnEnable.setEnabled(false);
106101
btnDisable.setEnabled(false);
107102
this.containerPropertyPresenter.onEnableAdminUser(subscriptionId, registryId, !isAdminEnabled);
@@ -110,8 +105,6 @@ private void onAdminUserBtnClick(ActionEvent actionEvent) {
110105
private void updateAdminUserBtn(boolean isAdminEnabled) {
111106
btnEnable.setEnabled(!isAdminEnabled);
112107
btnDisable.setEnabled(isAdminEnabled);
113-
btnEnable.setBackground(isAdminEnabled ? COLOR_CHOSEN : COLOR_UNCHOSEN);
114-
btnDisable.setBackground(!isAdminEnabled ? COLOR_CHOSEN : COLOR_UNCHOSEN);
115108
}
116109

117110

0 commit comments

Comments
 (0)