Перейти к содержанию
Fire Monkey от А до Я

vahidch

Пользователи
  • Постов

    2
  • Зарегистрирован

  • Посещение

Сообщения, опубликованные vahidch

  1. В 1/12/2018 в 4:36 PM, dnekrasov сказал:

    A mechanism that allows you to use a symbol font icon instead of a button image.

    I really don’t like the standard mechanism for adding a picture to a button, so a couple of years ago I started looking for an alternative and settled on character fonts (such as FontAwesome). That's what came out of it:

    DarkPreview.png.6c9ea022024d121ed6c5d459799474a0.pngLightPreview.png.be8e685d4bf7c197211c5b8504a0284a.png

    IconicFontGlyph.zip 78 \ u043a \ u041147 downloads  

    It works without problems under Windows - I have not tried it on other systems.

    How it works

    1. Add the UIExt.IconicFont.pas module to the project 
    2. Add the font description modules to be used in the project (see below)
    3. We describe the symbol that will be used as an icon (see below)
    4. In the OnApplyStyleLookup  button event handler, write one line -  TIconicFont.ApplyButtonStyle (TCustomButton (Sender));

    Font Description Modules

    Character Description

    To describe the symbol, the StyleName property is used (I do not know how the others are; personally, I do not use it anywhere). The description itself is a string in a specific format:

    [Short font name]; [character code]; ;

    The first 2 fields are required. The short font name can be seen in its description module (TIconicFont.Short)

    Examples can be seen in the screenshots above (the text above the buttons).

    And finally, a small demo of  IconicFontDemo.zip

    If possible, run this project for Android(FMX)
    No specific instructions for loading and launching fonts are included in the This Method
    Thank you

  2. An ImageList component editor to handle font icons in win32.

     

    What is it?

    FontIconEditor  is a simple component editor that allow you to add icons to a TImageList from a font. You can use any font you want. The editor gives you a link to Segoe MDL2 Assets page where you can find the hex codes.  

    source code https://github.com/lminuti/FontIconEditor

    Request this component (FontIconEditor) to FMX.possible?

     

     

    FontIconScreenShot01.png

    FontIconScreenShot02.png

×
×
  • Создать...