Giter Club home page Giter Club logo

material.icons's Introduction

Hi there 👋

material.icons's People

Contributors

ables3000 avatar amywarble avatar github-actions[bot] avatar jaggerjo avatar jp2masa avatar mariogk avatar poferro avatar skproch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

material.icons's Issues

Remove hard coded width and/or height from default wpf style

The current default style for the <wpf:MaterialIcon /> has a hard coded width and height of 16 pixels.

  • The icons are not all in 1:1 aspect ratio, so the actual size may not be what you specify (e.g. if the icon is wider then the icon height will not be 16 but a smaller number)
  • When using the control and specifying the size, you have to specify both width and height to actually get any effect.

It would be better if the default Width and/or Height where actually Double.NaN. That way, the icons will scale to whatever the parent control allows, and if I want to restrict it further, I can just set either Width or (more realistically) Height to whatever makes sense for that usage.

For reference, this is the style I apply globally in my apps to work around this:

<Style TargetType="{x:Type wpf:MaterialIcon}" >
    <Setter Property="Height" Value="NaN" />
    <Setter Property="Width" Value="NaN" />
</Style>

Upgrade to Avalonia 11.0.0-preview5

Discussed in #13

Originally posted by jp2masa February 5, 2023
Is there any ongoing work to upgrade Avalonia to 11.0.0-preview5? If not, I would like to give it a shot.

I also noticed this rollback commit for preview4 -> preview1: 25d6ac1, was there any specific problem?

Custom icons

Hello, is it possible to add custom icons?

I have some SVG files that I would like to integrate in Material.Icons so I can use the same API for Material Icons and Custom Icons.

Thanks

MissingMethodException on Avalonia 11.0.0-preview6

Exception has occurred: CLR/System.MissingMethodException
Exception thrown: 'System.MissingMethodException' in OpenTabletDriver.UI.Library.dll: 'Method not found: 'Boolean Avalonia.AvaloniaObject.SetAndRaise(Avalonia.AvaloniaProperty`1<!!0>, !!0 ByRef, !!0)'.'
   at Material.Icons.Avalonia.MaterialIcon.set_Kind(MaterialIconKind value)
   at OpenTabletDriver.UI.Views.MainWindowView.!XamlIlPopulate(IServiceProvider , MainWindowView ) in C:\Users\Oscar\projects\OpenTabletDriver\OpenTabletDriver.UI.Library\Views/MainWindowView.axaml:line 54
                    <materialIcons:MaterialIcon Kind="ArrowLeft"
                                                Margin="20, 0"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"/>

Outdated Icons

Nice library. I've noticed that a fair amount of the icons are missing e.g. Dashboard. Is it worth bumping the NuGet version with a rebuild to automatically generate the newer icons?

How to change the size?

How can I set the size of the icon when using it this way?

<materialIcons:MaterialIcon Kind="Abacus" />

I don't see Size attribute, while it is available in the "extension":

<Button Content="{materialIcons:MaterialIconExt Kind=Abacus, **Size=30**}" />

StyleInclude

<Application xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             x:Class="ViMultiSync.App"
             xmlns:local="using:ViMultiSync"
             xmlns:viMultiSync="clr-namespace:ViMultiSync"
             xmlns:views="clr-namespace:ViMultiSync.Views"
             xmlns:viewModels="clr-namespace:ViMultiSync.ViewModels"
             xmlns:material="using:Material.Icons.Avalonia"
             RequestedThemeVariant="Default">

    <Application.DataTemplates>
        <viMultiSync:ViewLocator/>
    </Application.DataTemplates>
  
    <Application.Styles>
        <FluentTheme />
        <StyleInclude Source="Styles/AnimatedPopup.axaml"/>
        <StyleInclude Source="Styles/Button/PopupButton.axaml"/>
        <StyleInclude Source="Styles/Keyboard.axaml"/>
        <StyleInclude Source="avares://Material.Icons.Avalonia/App.xaml" />
	</Application.Styles>
</Application>

Exception : Avalonia.Markup.Xaml.XamlLoadException: 'No precompiled XAML found for materialicons:MaterialIconStyles (baseUri: avares://ViMultiSync/App.axaml), make sure to specify x:Class and include your XAML file as AvaloniaResource'

your Material.Icon works with Avalonia 11.0.5?

Winui 3

Wondering if you plan on introducing a Winui 3 set?

Would be very welcome

Outlined Icon?

Is there a way to add an outline (or "border") to the icon?

XamlLoadException on Avalonia 11.0.0

I upgraded to Avalonia 11.0.0 official version and the loading started with an error:

Avalonia.Markup.Xaml.XamlLoadException:“No precompiled XAML found for avares://Material.Icons.Avalonia/App.xaml (baseUri: avares://AvaloniaApplication1/App.axaml), make sure to specify x:Class and include your XAML file as AvaloniaResource”

"MaterialIcon.Kind" property is not StyledProperty

Problem: can't be used in selector with child element.
Exception: (System.InvalidOperationException: Cannot set direct property 'Kind' in 'CheckBox[IsChecked=True] > MaterialIcon' because the style has an activator.)

Example(CheckBox with changing Icon depending on IsChecked):
image

Strong signed assembly

Hi :),

Is it possible to strong sign the assemblies in this package?
I am developing a system that depends on strong signed assemblies so I needed this one to be also in order to use it :(.

Thanks in advance and best regards
POFerro

package mismatch

There is no Avalonia package available for the newest version (2.1.8). If I now use the Material.Icons package at some project (because of the ItemKind enum) and Material.Icons.Avalonia at some other project (latest version 2.1.0) then the enum values are wrong and the wrong icons are displayed. Additionally the newest icons can not be used with Material.Icons.Avalonia.

As is:
image
Expected (if I change the Material.Icons back to 2.1.0):
image

Solution would probably be to increase version number for the other projecs as well.

Unable to resolve type MaterialIcon

This error crashes JetBrains Rider Avalonia previewer.

Rider:

  JetBrains Rider 2023.3.4
  Build #RD-233.14475.66, built on March 6, 2024
  Runtime version: 17.0.10+1-b1087.17 amd64
  VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
  Windows 11.
  avalonia-rider (1.3.0)
<PackageReference Include="Material.Icons.Avalonia" Version="2.1.9" />
2024-04-12 17:17:18,850 [  19198]   WARN - #me.fornever.avaloniarider.idea.editor.BitmapPreviewEditorComponent - XAML update error: XamlParseException at 29:26: Unable to resolve type MaterialIcon from namespace clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia Line 29, position 26.
XamlX.XamlParseException: Unable to resolve type MaterialIcon from namespace clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia Line 29, position 26.
   at XamlX.Transform.Transformers.TypeReferenceResolver.ResolveTypeCore(AstTransformationContext context, String xmlns, String name, Boolean isMarkupExtension, List`1 typeArguments, IXamlLineInfo lineInfo, Boolean strict)
   at XamlX.Transform.Transformers.TypeReferenceResolver.ResolveType(AstTransformationContext context, String xmlns, String name, Boolean isMarkupExtension, List`1 typeArguments, IXamlLineInfo lineInfo, Boolean strict)
   at XamlX.Transform.Transformers.TypeReferenceResolver.ResolveType(AstTransformationContext context, XamlAstXmlTypeReference xmlref, Boolean strict)
   at XamlX.Transform.Transformers.TypeReferenceResolver.Transform(AstTransformationContext context, IXamlAstNode node)
   at XamlX.Transform.AstTransformationContext.Visitor.Visit(IXamlAstNode node)
   at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstXamlPropertyValueNode.VisitChildren(IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor)
   at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
   at XamlX.Transform.AstTransformationContext.Visit(IXamlAstNode root, IXamlAstTransformer transformer)
   at XamlX.Compiler.XamlCompiler`2.Transform(XamlDocument doc, Boolean strict)
   at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadGroupSreCore(IReadOnlyCollection`1 documents, RuntimeXamlLoaderConfiguration configuration)
   at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadSreCore(RuntimeXamlLoaderDocument document, RuntimeXamlLoaderConfiguration configuration)
   at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadSre(RuntimeXamlLoaderDocument document, RuntimeXamlLoaderConfiguration configuration)
   at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.Load(RuntimeXamlLoaderDocument document, RuntimeXamlLoaderConfiguration configuration)
   at Avalonia.Designer.HostApp.DesignXamlLoader.Load(RuntimeXamlLoaderDocument document, RuntimeXamlLoaderConfiguration configuration)
   at Avalonia.DesignerSupport.DesignWindowLoader.LoadDesignerWindow(String xaml, String assemblyPath, String xamlFileProjectPath, Double renderScaling)
   at Avalonia.DesignerSupport.Remote.RemoteDesignerEntryPoint.<>c__DisplayClass18_0.<OnTransportMessage>b__0()

No idea whether this is library related or a bug with Avalonia itself. I have previously made an issue on Avalonia preview repo, but they directed me towards Avalonia themselves or the library (Material.Icons.Avalonia)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.