License Gem Version Documentation

Material Design Art Provider for wxRuby3

This custom Art Provider was inspired by wxMaterialDesignArtProvider but rewritten in pure Ruby for use with wxRuby3.
See the License section below to see where the original icons were taken from.

screenshots

Installing

wxRuby3-MaterialDesignArtProvider is distributed as a Ruby gem on RubyGems. This gem can also be downloaded from the release assets on Github.

Installing the gem requires no additional installation steps and/or additional software to be installed except for a supported version of the Ruby interpreter. So the following command is all it takes to install:

1gem install wxruby3-mdap

Using

To add Wx::MDAP::MaterialDesignArtProvider to your project you first need to require it like this:

1require 'wx'        # make sure the wxRuby3 libraries have been loaded 
2require 'wx/mdap'   # now load the wxRuby3-MaterialDesignArtProvider library

Next, before you load images through Wx::ArtProvider register the Wx::MDAP::MaterialDesignArtProvider like this:

1Wx::ArtProvider.push(Wx::MDAP::MaterialDesignArtProvider.new)
2# You can in fact normally also reference the class as `Wx::MaterialDesignArtProvider` (unless the constant 
3# `Wx::MaterialDesignArtProvider` was already defined before requiring 'wx/mdap').

Now that the new art provider has been installed the new Material Design art ids can be used. Constants for these are all defined in the Wx::MDAP module as ‘Wx::MDAP::ART_ICON_NAME’ (see here). Many of these art ids are available under most of the various client ids (also defined here) while others are only available under some client ids (as can be seen in the documentation). The client ids each correspond to a different collection in the full dataset:

  • Material Design art
    • Wx::MDAP::ART_MATERIAL_DESIGN_FILLED
    • Wx::MDAP::ART_MATERIAL_DESIGN_OUTLINE
    • Wx::MDAP::ART_MATERIAL_DESIGN_ROUND
    • Wx::MDAP::ART_MATERIAL_DESIGN_SHARP
    • Wx::MDAP::ART_MATERIAL_DESIGN_TWO_TONE
  • Font Awesome art
    • Wx::MDAP::ART_FONT_AWESOME_SOLID
    • Wx::MDAP::ART_FONT_AWESOME_REGULAR
    • Wx::MDAP::ART_FONT_AWESOME_BRANDS
  • Fluent UI art
    • Wx::MDAP::ART_FLUENT_UI_FILLED
    • Wx::MDAP::ART_FLUENT_UI_REGULAR
  • Simple Icons art
    • Wx::MDAP::ART_SIMPLE_ICONS_ICONS

Of these collections, Wx::MDAP::ART_FONT_AWESOME_BRANDS and Wx::MDAP::ART_SIMPLE_ICONS_ICONS are the odd ones out as these do not contain any action/function icons but rather brand/logo icons.

Extensions

wxRuby3-MaterialDesignArtProvider offers several extensions to improve options for using the Material Design art:

  1. Wx::MDAP::MaterialDesignArtProvider supports mapping of standard wxRuby3 Art (Client) ids to Material Design ids so you can transparently switch standard art;
  2. Wx::MDAP::MaterialDesignArtProvider supports using custom colors with Material Design art;
  3. Wx::MDAP::MaterialDesignArtProvider supports using custom default sizes with Material Design art.

See Wx::MDAP::MaterialDesignArtProvider for details concerning these extensions.

Example

For more details and a working example of how to use Wx::MDAP::MaterialDesignArtProvider see here.

License

  • FontAwesome icons from the FontAwesome 6 SVG set are subject to the CC BY 4.0 License
    (the included icons have been copied from https://github.com/FortAwesome/Font-Awesome)
  • MaterialDesign icons are created by Google and subject to the Apache 2.0 License
    (the included SVG icons have been copied from https://github.com/marella/material-design-icons)
  • SimpleIcons are subject to the CC0 1.0 License
    (the included icons haven been copied from https://github.com/simple-icons/simple-icons)
  • FluentUI icons are subject to the MIT License
    (included SVG icons taken from FluentUI icons)

The wxRuby3 MaterialDesignArtProvider library itself is released under the MIT License.