I want to use animated GIF in my Gtk3 application. I know this can be done by assigning GdkPixbufAnimation to the Gtk.Image component, but this approach requires the animation file name to be referenced directly from the source code.
Is it possible to specify the animation file in CSS, like "normal" background image? I tried to set the animated GIF as background-image property of Gtk.Image and Gtk.Label components, but the image is displayed statically.
Related
For a touchscreen I need to increase the height of my buttons in a ABAP WebDynpro Application.
Because there's no attribute for the height I read that it should be possible to add an image to the MIME Repository and then add this image to the button.
I also read that it might be possible to create a own theme with a .css file.
The last one sounds a little bit better to me. Does anyone know how I can create such a theme and apply it to my application?
Thanks for your help!
The simpliest way of resizing height is using MIME image, which I want to describe here:
Create your image with exactly those height that you need. The image could be opaque, transparent or whatever. Image format doesn't matter, as most common formats (jpg, gif, png) are supported.
Import it to your Webdyn Pro component like this: right click on component in repository tree, then -> Create -> MIME object -> Import
After image was successfully imported, just select it using imageSource property of button element, where you can find it on Component images tab.
Voilá! The button adopted the dimensions of the image.
I've been using icon-fonts created at IcoMoon and they are fantastic. For this I import an SVG Illistrator output (or use premade icons) and create font files that are attached using CSS #Font-Face. These are only ever one color.
I've been reading about SVG Sprites like here: http://css-tricks.com/svg-sprites-use-better-icon-fonts/
I've tried uploading illistrator SVG files with different colors into IcoMoon (as explained at the bottom of the link above) and then creating a SVG Sprite but the color never comes through (always just one color).
Am I doing something wrong with IcoMoon? How can I create a color SVG Sprite using a site like IcoMoon that can be used to display icons where required?
thankyou
Note: i need multiple colors in each image. (not just one color styled via CSS).
Look at the Google homepage being displayed right at this moment. A screenshot is provided below.
Instead of using this as a single image Google used css sprite. The sprite image
is provided below (dimension changed):
Question is why css sprite was used instead of a single image ? If a single image was used then wouldn't the number of HTTP requests be same as in this css sprite case ?
A single image would not allow for (different) hover effects in different areas.
Or you would have to load an image of the same size for each animation. By using a sprite, you just have to load the image once and all animations run with that data.
CSS sprites are a way to reduce the number of HTTP requests made for image resources referenced by your site. Images are combined into one larger image at defined X and Y coordinates.
Having assigned this generated image to relevant page elements the background-position CSS property can then be used to shift the visible area to the required component image.
We're using SVGs for the first time for our mobile HTML5 based app sprites file (they make dealing with retina an other screen size differences easy).
I know generated SVGs can be manipulated directly (as they are text files) but can one modify an SVG asset (in this case, a background image loaded via the CSS) via CSS or scripting?
For instance, can we load an all-black SVG object, and then change it to white?
You can't access the DOM of the SVG file if it's loaded as an image (either through img or background-image). You can't style it via CSS either.
If you intend to do these kind of manipulations you should append the SVG to a div. You should still be able to perform sprite-like manipulations to that div. You will be able to style it via CSS or javascript.
The SVG should be inlined. You can copy and paste the SVG into the div that used to contain background-image or load it there through an ajax request.
Instead of animating background-position you can animate with left or -webkit-transform: translate(...).
Every time I compile a MXML file, I get a SWF file. When I load the SWF file to the browser, all the space outside the SWF file is this gray gradient.
I want to change the color, or make it disappear entirely, however, when I search for "Flex background color" I get information to do other things.
How do I get rid of that?
Add the following to thr compiler arguments:
-default-background-color #222222
Where color is the color you like.
To change background color of SWF itself change values of Application tag. For MX Application refer to the documentation and take a look at backgroundGradientAlphas and backgroundGradientColors styles.
For Spark Application documentation is here.