Skip to content

Commit 10e6b91

Browse files
committed
Bugfixes.
1 parent 39e037a commit 10e6b91

File tree

10 files changed

+75
-46
lines changed

10 files changed

+75
-46
lines changed

develnext-designer/src/main/java/org/develnext/jphp/gui/designer/classes/UXDesigner.java

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ protected void updateHelpers() {
177177
Rectangle2D viewPort = new Rectangle2D(0, 0, AREA_BLOCK_SIZE, AREA_BLOCK_SIZE);
178178

179179
//imageView.setFitWidth(AREA_BLOCK_SIZE);
180-
// imageView.setFitHeight(AREA_BLOCK_SIZE);
180+
// imageView.setFitHeight(AREA_BLOCK_SIZE);
181181

182182
if (J == heightBlocks - 1) {
183183
double hh = height % AREA_BLOCK_SIZE;
@@ -1070,11 +1070,11 @@ public void handle(final MouseEvent e) {
10701070
if (intersectedNode != null && intersectedNode != node && isWithChildrenNode(intersectedNode)) {
10711071
//return;
10721072
} else { */
1073-
if (onNodeClick != null) {
1074-
if (onNodeClick.callAny(e).toBoolean()) {
1075-
return;
1076-
}
1073+
if (onNodeClick != null) {
1074+
if (onNodeClick.callAny(e).toBoolean()) {
1075+
return;
10771076
}
1077+
}
10781078
//}
10791079

10801080
if (!dragged) {
@@ -1503,39 +1503,47 @@ public void handle(MouseEvent event) {
15031503
border.setVisible(false);
15041504
resizePoint = null;
15051505

1506-
final double centerX = getCenterX(node);
1507-
final double centerY = getCenterY(node);
1506+
Effect effect = node.getEffect();
1507+
node.setEffect(null);
15081508

1509-
Bounds bounds = node.getBoundsInLocal();
1509+
try {
1510+
final double centerX = getCenterX(node);
1511+
final double centerY = getCenterY(node);
15101512

1511-
if (resizeW != bounds.getWidth()) {
1512-
if (resizeX == nodeX) {
1513-
if (AnchorPane.getRightAnchor(node) != null) {
1514-
double offset = resizeW - bounds.getWidth();
1515-
AnchorPane.setRightAnchor(node, AnchorPane.getRightAnchor(node) - offset);
1516-
}
1517-
} else {
1518-
if (AnchorPane.getLeftAnchor(node) != null) {
1519-
AnchorPane.setLeftAnchor(node, (double) resizeX);
1513+
Bounds bounds = node.getBoundsInLocal();
1514+
Bounds borderBounds = border.getBoundsInLocal();
1515+
1516+
if (resizeW != bounds.getWidth()) {
1517+
if (resizeX == nodeX) {
1518+
if (AnchorPane.getRightAnchor(node) != null) {
1519+
double offset = resizeW - bounds.getWidth();
1520+
AnchorPane.setRightAnchor(node, AnchorPane.getRightAnchor(node) - offset);
1521+
}
1522+
} else {
1523+
if (AnchorPane.getLeftAnchor(node) != null) {
1524+
AnchorPane.setLeftAnchor(node, (double) resizeX);
1525+
}
15201526
}
15211527
}
1522-
}
15231528

1524-
if (resizeH != bounds.getHeight()) {
1525-
if (resizeY == nodeY) {
1526-
if (AnchorPane.getBottomAnchor(node) != null) {
1527-
double offset = resizeH - bounds.getHeight();
1528-
AnchorPane.setBottomAnchor(node, AnchorPane.getBottomAnchor(node) - offset);
1529-
}
1530-
} else {
1531-
if (AnchorPane.getTopAnchor(node) != null) {
1532-
AnchorPane.setTopAnchor(node, (double) resizeY);
1529+
if (resizeH != bounds.getHeight()) {
1530+
if (resizeY == nodeY) {
1531+
if (AnchorPane.getBottomAnchor(node) != null) {
1532+
double offset = resizeH - bounds.getHeight();
1533+
AnchorPane.setBottomAnchor(node, AnchorPane.getBottomAnchor(node) - offset);
1534+
}
1535+
} else {
1536+
if (AnchorPane.getTopAnchor(node) != null) {
1537+
AnchorPane.setTopAnchor(node, (double) resizeY);
1538+
}
15331539
}
15341540
}
1535-
}
15361541

1537-
resizeNode(node, resizeW, resizeH);
1538-
node.relocate(resizeX - centerX, resizeY - centerY);
1542+
resizeNode(node, resizeW, resizeH);
1543+
node.relocate(resizeX - centerX, resizeY - centerY);
1544+
} finally {
1545+
node.setEffect(effect);
1546+
}
15391547

15401548

15411549
if (onChanged != null) {

develnext/launcher/DevelNext.exe

0 Bytes
Binary file not shown.

develnext/misc/history.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
- Исправлено: при изменении свойства формы resizable, форма увеличивалась в размерах, только в ОС Windows.
5858
- Исправлено: редактор кода полностью пропадал в некоторых случаях переключения между дизайном и исходным кодом.
5959
- Исправлено: свойство растягивание некорректно срабатывало для компонентов находящихся на панелях с окантовкой.
60+
- Исправлено: визуальный редактор для компонентов с некоторыми эффектами, например с тенями, некорректно изменял ширину и высоту.
6061

6162
Beta-5
6263
-------------------

develnext/src/.system/application.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# MAIN CONFIGURATION
22

33
app.name = DevelNext
4-
app.version = 16 rc-1 (snapshot)
5-
app.hash = 2016091912
4+
app.version = 16 rc-1
5+
app.hash = 2016092012
66
app.uuid =
77
app.implicitExit = 0
88

develnext/src/ide/editors/FormEditor.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,8 +1969,13 @@ public function makeLeftPaneUi()
19691969
Logger::warn("Unable to call deleteSelf() of behaviour spec class, node not found, targetId = $targetId");
19701970
}
19711971
});
1972+
19721973
$this->behaviourPane->on('add', function () {
19731974
$this->reindex();
1975+
1976+
if ($this->designer->pickedNode) {
1977+
$this->refreshNode($this->designer->pickedNode);
1978+
}
19741979
});
19751980

19761981
$ui->addBehaviourPane($this->behaviourPane);

develnext/src/ide/protocol/handlers/OpenProjectProtocolHandler.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,20 @@ public function handle($query)
4141
if ($uid) {
4242
Ide::get()->disableOpenLastProject();
4343

44-
uiLater(function () use ($uid) {
45-
Ide::service()->projectArchive()->getAsync($uid, function (ServiceResponse $response) use ($uid) {
46-
if ($response->isSuccess()) {
47-
uiLater(function () use ($response) {
48-
Notifications::show('Обнаружен проект', 'Мы обнаружили ссылку на общедоступный проект, вы можете его открыть.', 'INFORMATION');
49-
$dialog = new SharedProjectDetailForm($response->data()['uid']);
50-
$dialog->showAndWait();
51-
});
52-
} else {
53-
Logger::error("Unable to get project, uid = $uid, {$response->toLog()}");
54-
Notifications::error('Ошибка открытия', 'Ссылка на проект некорректная или он был уже удален.');
55-
}
44+
Ide::get()->bind('start', function () use ($uid) {
45+
uiLater(function () use ($uid) {
46+
Ide::service()->projectArchive()->getAsync($uid, function (ServiceResponse $response) use ($uid) {
47+
if ($response->isSuccess()) {
48+
uiLater(function () use ($response) {
49+
Notifications::show('Обнаружен проект', 'Мы обнаружили ссылку на общедоступный проект, вы можете его открыть.', 'INFORMATION');
50+
$dialog = new SharedProjectDetailForm($response->data()['uid']);
51+
$dialog->showAndWait();
52+
});
53+
} else {
54+
Logger::error("Unable to get project, uid = $uid, {$response->toLog()}");
55+
Notifications::error('Ошибка открытия', 'Ссылка на проект некорректная или он был уже удален.');
56+
}
57+
});
5658
});
5759
});
5860
}

develnext/windowsSetup/innosetup.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "DevelNext"
5-
#define MyAppVersion "2016 beta-5"
5+
#define MyAppVersion "2016 rc-1"
66
#define MyAppPublisher "develnext.org"
77
#define MyAppURL "http://develnext.org"
88
#define MyAppExeName "DevelNext.exe"

jphp-app-framework/src/behaviour/custom/DropShadowEffectBehaviour.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class DropShadowEffectBehaviour extends EffectBehaviour
2626
/**
2727
* @var UXColor|string
2828
*/
29-
protected $_color = 'black';
29+
protected $_color = '#b3b3b3';
3030

3131
/**
3232
* @return UXEffect

jphp-gui-ext/src/main/java/org/develnext/jphp/ext/javafx/classes/UXNode.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,9 @@ public void setAnchorFlags(ArrayMemory value) {
346346
return;
347347
}
348348

349+
Effect effect = getWrappedObject().getEffect();
350+
getWrappedObject().setEffect(null);
351+
349352
Bounds bounds = getBoundsInParent();
350353

351354
Border border = parent instanceof Region ? ((Region) parent).getBorder() : null;
@@ -391,6 +394,8 @@ public void setAnchorFlags(ArrayMemory value) {
391394
setBottomAnchor(Memory.NULL);
392395
}
393396
}
397+
398+
getWrappedObject().setEffect(effect);
394399
}
395400

396401
@Setter

jphp-gui-ext/src/main/java/org/develnext/jphp/ext/javafx/support/control/Panel.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ public void setBorderStyle(String borderStyle) {
104104
}
105105

106106
public void setBorderRadius(double radius) {
107+
if (radius < 0) {
108+
radius = 0;
109+
}
110+
107111
this.borderRadius = new CornerRadii(radius);
108112
updateBorder();
109113
}
@@ -117,6 +121,10 @@ public double getBorderWidth() {
117121
}
118122

119123
public void setBorderWidth(double value) {
124+
if (value < 0) {
125+
value = 0;
126+
}
127+
120128
borderWidths = new BorderWidths(value);
121129
updateBorder();
122130
}

0 commit comments

Comments
 (0)