Jump to content

Recommended Posts

  • 8 months later...
Posted

Oliver can you give us an example how you use it with unigui?

Hi Skepsis,

 
  a simple (server side) way to use the Google Material Icons is: 
 
1) add the reference to Material Icons in ServerModule
    procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);
    begin
      ...
      CustomMeta.Add(  '<link href="https://fonts.googleapis.com/icon?family=Material+Icons"rel="stylesheet">' );
    end;
 
2) Insert in the form a TUniLabel with 
    AutoSize:    False
    Caption:     the icon name; see in https://design.google.com/icons
    Font.Name:  'Material Icons';
 
You can set the color and the size.
 
See the page https://design.google.com/icons  for available icons.
In the TUniLabel caption property, replace the space contained in the name with the char "_": if the icon name is  "shopping cart", write shopping_cart in the caption.
 
Cesare

post-662-0-10709900-1474322456_thumb.jpg

GoogleMaterialIconsDemo.rar

Posted

Well I made my redneck solution while uniGUI does not support it,

not what you asked for,When the user clicks in a Image it calls an associated PopUpMenu

so it really thinks it was a button.

I think it should be the first thing to do after 1.0 improve the images resolution in all buttons.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...