mastodon.design is one of the many independent Mastodon servers you can use to participate in the fediverse.
A small instance for and by people who make things! We stand for an open, independent, sustainable, inclusive, and accessible web.

Administered by:

Server stats:

338
active users

Today I began building a native icon manager app for Linux.
On MacOS, I relied on IconJar to select icon sets that fitted different visual styles. It also gave me lightning-fast access to glyphs I would use over and over again, like arrows and chevrons.
While we have Norde Source for Linux, sadly:
- It crashes when you click-and-drag an icon
- It's slow to load
- It hasn't been updated in 4 years
Let's see where this goes!

The UI is coming along, bit by bit! Building templates is coming a bit more naturally too.

Today I managed to:
- load a directory of icons into the app. Even with 2000+ icons in the grid it's not too sluggish!
- add a right-click context menu
- invert the icons in dark mode
- show the details of the selected icon in the sidebar
- get the sidebar toggle button working

Will need to pick someone's brain on why the SVGs are rendered blurry at some point. (They're in GtkImage widgets with a set pixel-size)

#GNOME#FOSS#AppDev

@chriswood SVG are rasterised on upload, and GtkImage does not change the size of its contents, so the content get stretched.

If you want to render an SVG at different sizes you will need to load it with librsvg directly and implement a GdkPaintable object; there’s a demo in gtk4-demo.

@ebassi Ah perfect, thank you! Will take a look at this

Chris Wood

@ebassi Got it, thank you very much!
I'm writing the app in Javascript and am not familiar with C. It looks like the method gdk_paintable_snapshot is the important one, is that right? Is there any steer you could give me on how to make a snapshot from the contents of an SVG file?

@chriswood you need to implement the Gdk.Paintable interface, and override the vfunc_snapshot, vfunc_get_intrinsic_width, and vfunc_get_intrinsic_height methods. Inside the vfunc_snapshot you render to a Cairo context using Rsvg.