mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-153071 Settings > Version Control > Confirmation window resize issues
This commit is contained in:
+6
-10
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.openapi.vcs.configurable.VcsGeneralConfigurationPanel">
|
||||
<grid id="7e224" binding="myPanel" layout-manager="GridLayoutManager" row-count="4" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="7e224" binding="myPanel" custom-create="true" layout-manager="GridLayoutManager" row-count="4" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="32" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="7" y="16" width="868" height="558"/>
|
||||
@@ -16,7 +16,7 @@
|
||||
<grid id="4ec1c" binding="myAddConfirmationPanel" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
@@ -51,12 +51,10 @@
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="19911" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="19911" binding="myEmptyChangeListPanel" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="300" height="-1"/>
|
||||
</grid>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
@@ -94,7 +92,7 @@
|
||||
<grid id="8145c" binding="myRemoveConfirmationPanel" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
@@ -136,9 +134,7 @@
|
||||
<grid id="a5aa5" binding="myPromptsPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="400" height="-1"/>
|
||||
</grid>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
|
||||
+22
@@ -24,10 +24,12 @@ import com.intellij.openapi.vcs.*;
|
||||
import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx;
|
||||
import com.intellij.openapi.vcs.readOnlyHandler.ReadonlyStatusHandlerImpl;
|
||||
import com.intellij.openapi.vfs.ReadonlyStatusHandler;
|
||||
import com.intellij.ui.border.IdeaTitledBorder;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.Border;
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
@@ -59,6 +61,7 @@ public class VcsGeneralConfigurationPanel {
|
||||
private JComboBox myOnPatchCreation;
|
||||
private JCheckBox myReloadContext;
|
||||
private JLabel myOnPatchCreationLabel;
|
||||
private JPanel myEmptyChangeListPanel;
|
||||
private ButtonGroup myEmptyChangelistRemovingGroup;
|
||||
|
||||
public VcsGeneralConfigurationPanel(final Project project) {
|
||||
@@ -140,6 +143,25 @@ public class VcsGeneralConfigurationPanel {
|
||||
.getConfirmation(VcsConfiguration.StandardConfirmation.REMOVE);
|
||||
}
|
||||
|
||||
private void createUIComponents() {
|
||||
myPanel = new JPanel() {
|
||||
@Override
|
||||
public void doLayout() {
|
||||
updateMinSize(myAddConfirmationPanel, myRemoveConfirmationPanel, myEmptyChangeListPanel, myPromptsPanel);
|
||||
super.doLayout();
|
||||
}
|
||||
|
||||
private void updateMinSize(JPanel... panels) {
|
||||
for (JPanel panel : panels) {
|
||||
Border border = panel.getBorder();
|
||||
if (border instanceof IdeaTitledBorder) {
|
||||
((IdeaTitledBorder)border).acceptMinimumSize(panel);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
private static VcsShowConfirmationOption.Value getSelected(JRadioButton[] group) {
|
||||
if (group[0].isSelected()) return VcsShowConfirmationOption.Value.SHOW_CONFIRMATION;
|
||||
|
||||
Reference in New Issue
Block a user