tweaked vector editor's layout to match the paint editor's

pull/95/head
jmoenig 2020-07-13 17:47:43 +02:00
rodzic 81c96fe9ba
commit 340aa9a6c3
3 zmienionych plików z 17 dodań i 8 usunięć

Wyświetl plik

@ -4,6 +4,7 @@
### 2020-07-13
* paint, symbols: new iconic buttons for grow, shrink and flip actions, thanks, Jadga!
* sketch: tweaked layout to match the paint editor's
### 2020-07-10
* morphic: prevent the browser from hijacking cmd-d/f/i/p/s key events

Wyświetl plik

@ -15,7 +15,7 @@
<script src="src/lists.js?version=2020-07-01"></script>
<script src="src/byob.js?version=2020-07-01"></script>
<script src="src/tables.js?version=2020-05-18"></script>
<script src="src/sketch.js?version=2020-04-15"></script>
<script src="src/sketch.js?version=2020-07-13"></script>
<script src="src/video.js?version=2019-06-27"></script>
<script src="src/maps.js?version=2020-03-25"></script>
<script src="src/xml.js?version=2020-04-27"></script>

Wyświetl plik

@ -59,9 +59,9 @@
/*global Point, Object, Rectangle, AlignmentMorph, Morph, XML_Element, nop,
PaintColorPickerMorph, Color, SliderMorph, InputFieldMorph, ToggleMorph,
TextMorph, Image, newCanvas, PaintEditorMorph, StageMorph, Costume, isNil,
localize, PaintCanvasMorph, detect, modules*/
localize, PaintCanvasMorph, StringMorph, detect, modules*/
modules.sketch = '2020-April-15';
modules.sketch = '2020-July-13';
// Declarations
@ -1261,7 +1261,10 @@ VectorPaintEditorMorph.prototype.populatePropertiesMenu = function () {
pc = this.propertiesControls,
alpen = new AlignmentMorph("row", this.padding),
alignColor = new AlignmentMorph("row", this.padding),
alignNames = new AlignmentMorph("row", this.padding);
alignNames = new AlignmentMorph("row", this.padding),
brushControl = new AlignmentMorph("column");
brushControl.alignment = "left";
pc.primaryColorViewer = new Morph();
pc.primaryColorViewer.color = new Color(0, 0, 0);
@ -1345,22 +1348,27 @@ VectorPaintEditorMorph.prototype.populatePropertiesMenu = function () {
function () { return myself.shift; }
);
pc.constrain.label.isBold = false;
alignColor.add(pc.secondaryColorViewer);
alignColor.add(pc.primaryColorViewer);
alignColor.fixLayout();
alignNames.add(new TextMorph(localize('Edge color\n(left click)'),
null, null, null, null,
10, null, null, null,
'center', 85));
alignNames.add(new TextMorph(localize('Fill color\n(right click)'),
null, null, null, null,
10, null, null, null,
'center', 85));
alignNames.fixLayout();
c.add(pc.colorpicker);
c.add(alignNames);
c.add(alignColor);
c.add(new TextMorph(localize('Brush size')));
c.add(alpen);
brushControl.add(
new StringMorph(localize("Brush size") + ":", 10, null, true)
);
brushControl.add(alpen);
brushControl.fixLayout();
c.add(brushControl);
c.add(pc.constrain);
};