Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
appinventor-sources
Commits
cf16f1dc
Commit
cf16f1dc
authored
Apr 30, 2013
by
josmas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not resize the canvas icon if a background image is not being used
Change-Id: If601bafd70beb7e0b5bf995727055f3685a8a03d
parent
5cc3cd57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockCanvas.java
...pinventor/client/editor/simple/components/MockCanvas.java
+7
-3
No files found.
appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockCanvas.java
View file @
cf16f1dc
...
...
@@ -8,6 +8,7 @@ package com.google.appinventor.client.editor.simple.components;
import
com.google.appinventor.client.editor.simple.SimpleEditor
;
import
com.google.appinventor.client.editor.simple.palette.SimplePaletteItem
;
import
com.google.appinventor.client.widgets.dnd.DragSource
;
import
com.google.gwt.user.client.DOM
;
import
com.google.gwt.user.client.ui.AbsolutePanel
;
import
java.util.Comparator
;
...
...
@@ -83,12 +84,15 @@ public final class MockCanvas extends MockContainer {
// text was not recognized as an asset.
((
MockCanvasLayout
)
layout
).
setBackgroundImageUrl
(
""
);
url
=
"images/canvas.png"
;
// We set the background image of the canvasWidget so it displays the image. We do it inside
// the if because we need to override the background-size property only for this case
MockComponentsUtil
.
setWidgetBackgroundImage
(
canvasWidget
,
url
);
DOM
.
setStyleAttribute
(
canvasWidget
.
getElement
(),
"backgroundSize"
,
""
);
}
else
{
((
MockCanvasLayout
)
layout
).
setBackgroundImageUrl
(
url
);
// We set the background image of the canvasWidget so it displays the image.
MockComponentsUtil
.
setWidgetBackgroundImage
(
canvasWidget
,
url
);
}
// We set the background image of the canvasWidget so it displays the image.
MockComponentsUtil
.
setWidgetBackgroundImage
(
canvasWidget
,
url
);
}
private
static
class
MockSpriteWithCoordinates
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment