mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Revert "patch: apply somehow - make double click on splitter reset to default proportions"
This reverts commit aa69c1db04.
This commit is contained in:
@@ -41,12 +41,6 @@ public class DiffSplitter extends Splitter {
|
||||
@Nullable private AnAction myBottomAction;
|
||||
|
||||
public DiffSplitter() {
|
||||
this(.5f);
|
||||
}
|
||||
|
||||
public DiffSplitter(float proportion) {
|
||||
super(false, proportion);
|
||||
setDefaultProportion(proportion);
|
||||
setDividerWidth(JBUI.scale(30));
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ public class Splitter extends JPanel implements Splittable {
|
||||
private final float myMaxProp;
|
||||
|
||||
|
||||
protected float myDefaultProportion = .5f;
|
||||
protected float myProportion;// first size divided by (first + second)
|
||||
|
||||
protected final Divider myDivider;
|
||||
@@ -386,14 +385,6 @@ public class Splitter extends JPanel implements Splittable {
|
||||
repaint();
|
||||
}
|
||||
|
||||
public void setDefaultProportion(float value) {
|
||||
myDefaultProportion = value;
|
||||
}
|
||||
|
||||
public void resetProportion() {
|
||||
setProportion(myDefaultProportion);
|
||||
}
|
||||
|
||||
/**
|
||||
* Swaps components.
|
||||
*/
|
||||
@@ -579,7 +570,7 @@ public class Splitter extends JPanel implements Splittable {
|
||||
new ClickListener() {
|
||||
@Override
|
||||
public boolean onClick(@NotNull MouseEvent e, int clickCount) {
|
||||
resetProportion();
|
||||
setProportion(.5f);
|
||||
return true;
|
||||
}
|
||||
}.installOn(splitCenterlabel);
|
||||
@@ -649,7 +640,7 @@ public class Splitter extends JPanel implements Splittable {
|
||||
Splitter.this.setOrientation(!Splitter.this.getOrientation());
|
||||
}
|
||||
if (myResizeEnabled && e.getClickCount() == 2) {
|
||||
resetProportion();
|
||||
Splitter.this.setProportion(.5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -98,7 +98,8 @@ class ApplyPatchViewer implements Disposable {
|
||||
patchPanel.add(myViewer.getPatchTitle(), BorderLayout.NORTH);
|
||||
|
||||
|
||||
myPatchSplitter = new DiffSplitter(2f / 3);
|
||||
myPatchSplitter = new DiffSplitter();
|
||||
myPatchSplitter.setProportion(2f / 3);
|
||||
myPatchSplitter.setFirstComponent(myViewer.getComponent());
|
||||
myPatchSplitter.setSecondComponent(patchPanel);
|
||||
myPatchSplitter.setHonorComponentsMinimumSize(false);
|
||||
|
||||
Reference in New Issue
Block a user