mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
splitter cursor fixes
This commit is contained in:
@@ -455,19 +455,27 @@ public class ThreeComponentsSplitter extends JPanel {
|
||||
}
|
||||
|
||||
private boolean isInside(Point p) {
|
||||
if (!isVisible()) return false;
|
||||
|
||||
if (myVerticalSplit) {
|
||||
if (getHeight() > 0) {
|
||||
return p.y >= 0 && p.y < getHeight();
|
||||
} else {
|
||||
return p.y >= -myDividerZone / 2 && p.y <= myDividerZone / 2;
|
||||
if (p.x >= 0 && p.x < getWidth()) {
|
||||
if (getHeight() > 0) {
|
||||
return p.y >= 0 && p.y < getHeight();
|
||||
} else {
|
||||
return p.y >= -myDividerZone / 2 && p.y <= myDividerZone / 2;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (getWidth() > 0) {
|
||||
return p.x >= 0 && p.x < getWidth();
|
||||
} else {
|
||||
return p.x >= -myDividerZone / 2 && p.x <= myDividerZone / 2;
|
||||
if (p.y >= 0 && p.y < getHeight()) {
|
||||
if (getWidth() > 0) {
|
||||
return p.x >= 0 && p.x < getWidth();
|
||||
} else {
|
||||
return p.x >= -myDividerZone / 2 && p.x <= myDividerZone / 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void init() {
|
||||
|
||||
@@ -136,9 +136,14 @@ public class IdeGlassPaneImpl extends JPanel implements IdeGlassPaneEx, IdeEvent
|
||||
if (target != null) {
|
||||
if (myLastCursorComponent != target) {
|
||||
myLastCursorComponent = target;
|
||||
myLastOriginalCursor = target.getCursor();
|
||||
if (target.isCursorSet()) {
|
||||
myLastOriginalCursor = target.getCursor();
|
||||
}
|
||||
}
|
||||
|
||||
if (cursor != null && !cursor.equals(target.getCursor())) {
|
||||
target.setCursor(cursor);
|
||||
}
|
||||
target.setCursor(cursor);
|
||||
}
|
||||
|
||||
getRootPane().setCursor(cursor);
|
||||
|
||||
Reference in New Issue
Block a user