summaryrefslogtreecommitdiff
path: root/blocks.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-05-16 14:38:37 +0200
committerjmoenig <jens@moenig.org>2013-05-16 14:38:37 +0200
commite1a30927139796bf9d1cd70bdf3d0189385f4637 (patch)
tree6a70d572c22093b63ebad5b8aec9474ee47b8551 /blocks.js
parentb74695d4a0318d5850d24ccf5353e6281354b423 (diff)
downloadsnap-e1a30927139796bf9d1cd70bdf3d0189385f4637.tar.gz
snap-e1a30927139796bf9d1cd70bdf3d0189385f4637.zip
"Flat" GUI design preference
in the IDE's settings menu
Diffstat (limited to 'blocks.js')
-rw-r--r--blocks.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/blocks.js b/blocks.js
index 3e32b16..4f1f093 100644
--- a/blocks.js
+++ b/blocks.js
@@ -153,7 +153,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.blocks = '2013-May-14';
+modules.blocks = '2013-May-16';
var SyntaxElementMorph;
var BlockMorph;
@@ -2201,10 +2201,11 @@ BlockMorph.prototype.toggleHighlight = function () {
BlockMorph.prototype.highlight = function (color, blur, border) {
var highlight = new BlockHighlightMorph(),
fb = this.fullBounds(),
- edge = useBlurredShadows ? blur : border;
+ edge = useBlurredShadows && !MorphicPreferences.isFlat ?
+ blur : border;
highlight.setExtent(fb.extent().add(edge * 2));
highlight.color = color;
- highlight.image = useBlurredShadows ?
+ highlight.image = useBlurredShadows && !MorphicPreferences.isFlat ?
this.highlightImageBlurred(color, blur)
: this.highlightImage(color, border);
highlight.setPosition(fb.origin.subtract(new Point(edge, edge)));
@@ -2434,7 +2435,8 @@ BlockMorph.prototype.thumbnail = function (scale, clipWidth, noShadow) {
if (!noShadow) {block.addShadow(); }
ext = block.fullBounds().extent();
if (!noShadow) {
- ext = ext.subtract(this.shadowBlur * (useBlurredShadows ? 1 : 2));
+ ext = ext.subtract(this.shadowBlur *
+ (useBlurredShadows && !MorphicPreferences.isFlat ? 1 : 2));
}
trgt = newCanvas(new Point(
Math.min(ext.x * scale, clipWidth || ext.x),