I cannot find a way to pick the arrow icons like the ones present in the PickList component, in order to use them in other CommandButtons.
Well, I know that in order to use an icon in CommandButton, one has to follow these instructions:
<p:commandButton outcome="target" icon="star" title="With Icon"/>
having defined the star icon in a css file:
.star {
background-image: url("images/star.png");
}
but I would prefer to use exactly the same arrows as for the PickList component.
Here a list of all available jQuery UI icons
jQueryUI Icons Cheatsheet N#1 (click on Toggle text to get all the names of the icons)
jQueryUI Icons Cheatsheet N#2
at least in <p:commandLink you can apply the icons using styleClass for example styleClass="ui-icon ui-icon-trash" (don't remember trying the same on p:commandButton - always preferred <p:commandLink)
B.T.W , <p:commandButton has no outcome attribute , <p:button has it...
In addition since PF v5.1.1 you can also use the icons of Font Awesome out of the box, by setting to true the primefaces.FONT_AWESOME context param , like this
<context-param>
<param-name>primefaces.FONT_AWESOME</param-name>
<param-value>true</param-value>
</context-param>
and using it like this:
<p:commandButton value="Download" icon="fa fa-download" type="button"/>
or
<p:menuitem value="Refresh" url="#" icon="fa fa-refresh"/>
See showcase: PrimeFaces - FontAwesome - Since v5.1.1
Primefaces use jQuery themeroller for styling UI. All of the used icons in Primefaces are from there. Just mouseover icon you like (in themeroller) and something like : .ui-icon-arrow-1-e will pop. Then use it like this:
<p:commandButton action="target" icon="ui-icon ui-icon-arrow-1-e" value="Arrow icon"/>
Try this it worked for me
.star {background:url("images/star.png") no-repeat !important;
width:20px;
height:16px;
}
Related
I'm creating a WP Mango app. I want to set the default page background to White, irrespective of whether Light or Dark Theme is selected, exactly like the default mail application.
I've followed this article and tried changing the default PhoneBackgroundBrush as:
(Application.Current.Resources["PhoneBackgroundBrush"]as SolidColorBrush).Color = Colors.White;
Any idea what I'm doing wrong or how to achieve that?
I messed with the sample, and simply don't recommend doing this. Do the extra work, create your own resources, and apply them yourself.
This method doesn't show updates in the designer, which will make your UI development difficult.
It also doesn't even work properly -- the background doesn't change. If you read the comments on the blog post, there are other issues with it working with other controls.
So, just do it normally - in your App.xaml (you could also do it in a seperate ResourceDictionary)
<!--Application Resources-->
<Application.Resources>
<SolidColorBrush Color="White" x:Key="WhiteBrush" />
<SolidColorBrush Color="#FFF222" x:Key="UglyYellowBrush" />
</Application.Resources>
then, on a page
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="{StaticResource UglyYellowBrush}">
... </Grid>
You could even do this quickly on all your pages using Find & Replace, provided that you never changed the name 'LayoutRoot'. If you find
<Grid x:Name="LayoutRoot" Background="Transparent">
you can replace with
<Grid x:Name="LayoutRoot" Background="{StaticResource UglyYellowBrush}">
The solution of creating your own style did not work for me. I tried setting the background to a light gray which worked in the design view but when I ran the emulator the standard black background appeared.
Is it possible to change the color and other CSS properties of anchors in iBooks epubs?
The color property doesn't react at all, while I do get background-color change on normal and hover link state (which activates on tap). The :hover background-color also remains after I come back to the book from Safari, until I tap another link on the same page, then the first one loses :hover bg color and the second one gets it.
:visited, :active or :focus don't do anything.
Am I missing something?
** Update 2012.09.12 **
You can now specify the option "specified-fonts" in the special ibooks file "com.apple.ibooks.display-options.xml" located in META-INF folder :
<?xml version="1.0" encoding="UTF-8"?>
<display_options>
<platform name="*">
<option name="specified-fonts">true</option>
</platform>
</display_options>
This will activate anchors styling, but only when the reader choose the font "Original" in iBooks. So you still need to use the trick beneath for the other fonts.
** End of update 2012.09.12 **
You're not missing anything, iBooks does not support style on links.
There is a way to get around it with the property -webkit-text-fill-color.
Be aware that it doesn't do anything on Adobe Digital Editions.
Here is a sample :
a:link, a:visited, a:hover, a:active
{
-webkit-text-fill-color: red;
}
I got this from twitter on #eprdctn.
is there anyway to reference jquery ui icons as regular images anywhere in my site?
If you've linked to the jquery CSS, you can get at the icons by applying the .ui-icon base class and the specific icon class (e.g - .ui-icon-close for close button) to your element (usually span)
The jquery wiki has a comprehensive list of icons and their classes, you can find it here : http://wiki.jqueryui.com/w/page/12137970/jQuery-UI-CSS-Framework
Just inspect the icon and get the class.
EDIT
Sample usage
<span class="ui-icon ui-icon-zoomin"></span> <!-- Shows a magnifying glass -->
<span class="ui-icon ui-icon-play"></span> <!-- Shows a play button -->
Take a look at this code snipplet: http://www.xinotes.org/notes/note/773/
you can use icon classes from jQueryUI Icons Cheatsheet
I have some problems
1. how do I make my statusbar context menu that consists of 2 choices of menu preferences and addons status
example of context menu i want to make
this is my code :
<popupset>
<menupopup id="intransContextMenu">
<menuitem label="intrans aktif"/>
<menuitem label="preferensi"/>
</menupopup>
</popupset>
<statusbar id="status-bar">
<image src="chrome://inlinetrans/skin/imagesOn_kecil.png" />
<statusbarpanel id="status-bar-intrans"
label="intrans"
context="intransContextMenu"
onclick="alert('okeh cuy')"
tooltiptext="intrans versi 1.0"
/>
</statusbar>
how to add images in the context menu? I have tried but why do I paste a picture that always appears under the label is not on the side of the label as I expected?
example of context menu i want to make
this is my code :
<popup id="contentAreaContextMenu">
<image src="chrome://inlinetrans/skin/imagesOn_kecil.png" />
<menuitem class="inlinetrans" id="inlineContext" oncommand= "hadits_mean.startFind(null);"
label="Cari Terjemahan"/>
</popup>
note :
whether the code used to display the menu by right clicking on the statusbar and allows web pages to be made in one file?
thank you for the answer..
I am not sure if the images are your only problem now? Opening the context menu should work (you are using the context attribute correctly).
Regarding images, have a look at the documentation. For statusbarpanel, you have to set the image attribute:
<statusbar id="status-bar">
<statusbarpanel id="status-bar-intrans"
image="chrome://inlinetrans/skin/imagesOn_kecil.png"
label="intrans"
context="intransContextMenu"
onclick="alert('okeh cuy')"
tooltiptext="intrans versi 1.0"
/>
</statusbar>
You might also want to have a look at the style classes and play with them (to be honest I'm not 100% sure if it is just sufficient to set the image attribute, so if this does not work, try with the style classes).
Similar for the menuitem. You have to set the image attribute and give the element the style class menu-iconic:
<menuitem class="inlinetrans menu-iconic"
id="inlineContext"
oncommand= "hadits_mean.startFind(null);"
label="Cari Terjemahan"
image="chrome://inlinetrans/skin/imagesOn_kecil.png"/>
Note: Afaik the statusbar is going to be removed in Firefox 4 (at least by default it is disabled)!
I'm learning about the Framework Icons in jQuery UI.
<span class="ui-icon ui-icon-circle-minus"></span>
produces an icon of a minus sign inside a circle.
Using the ThemeRoller Firefox Bookmarklet, I was able to change the color of the icon to red (to make it look like a delete button).
Q: How can I make one jQueryUI icon be red and another one another color?
<span class="ui-icon ui-icon-circle-plus"></span>
I'd like to make this one green.
Use the ui-state-... classes to change the state of the element with the icon. You'll need to design your theme so that items in different states (highlight,hover,active,error,default) have different colors.
<span class="ui-icon ui-icon-circle-plus ui-state-highlight"></span>
I would recommend against using the states this way (just to change colors, that is). I'd use the states semantically and let the icons render as needed to be consistent with the state. If I specifically needed red/green icons, I'd generate those icons specifically as images and simply use them directly instead of trying to design the theme to get different color choices just for those icons.
For what it's worth, I think the FamFamFam Silk icons integrate pretty well with jQuery UI.
You can't do this, at least not in the context of ThemeRoller. Themeroller uses one sprite image for this...a large image that contains all the Icons.
You can make another theme, same it's spritemap image to your images folder, and go into your jQuery UI CSS and change the .ui-icon-circle-plus background-image property.
It should look like this:
.ui-icon-circle-plus { background-position: 0 -192px; }
It would need to look something like this:
.ui-icon-circle-plus {
background-image: url(RedIcons.png);
background-position: 0 -192px;
}
You can look at the .ui-icon styles for the image it's currently using.