Gtk2::IconSize(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

πŸ’– Gtk2::IconSize β€” ok bestie, let's talk icon sizes πŸ’–

So this page lives in the User Contributed Perl Documentation section of the manual, it's Gtk2::IconSize(3), and honestly? It's giving tiny-but-mighty. It's a wrapper for GtkIconSize, no cap. πŸŽ€


✨ NAME ✨

Gtk2::IconSize β€” it's a wrapper for GtkIconSize, that's the whole vibe πŸ¦‹


🌸 HIERARCHY 🌸

Look at this little family tree, it's so cute:

  Glib::Enum
  +----Gtk2::IconSize

So yeah, Gtk2::IconSize is a child of Glib::Enum. Slay. πŸ‘‘


πŸ’… METHODS πŸ’…

iconsize = Gtk2::IconSize->from_name ($name)

  • $name (string)

Give it a name, it hands you back an iconsize. Iconic behaviour, fr. ✨

(width, height) = Gtk2::IconSize->lookup ($size)

  • $size (Gtk2::IconSize)

You pass in a $size, you get back a width and a height. Two-for-one, we love that. πŸ’–

(width, height) = Gtk2::IconSize->lookup_for_settings ($settings, $size)

  • $settings (Gtk2::Settings)
  • $size (Gtk2::IconSize)

Since: gtk+ 2.2

Same energy as lookup, but it peeks at your settings first. Very main character. 🫢

iconsize = Gtk2::IconSize->register ($name, $width, $height)

  • $name (string)
  • $width (integer)
  • $height (integer)

You bring the name, the $width, and the $height β€” it brings a brand new iconsize into the world. Registering, periodt. 🌟

Gtk2::IconSize->register_alias ($alias, $target)

  • $alias (string)
  • $target (Gtk2::IconSize)

Making an $alias point at a $target. Basically a nickname situation. So real. πŸŽ€


🌈 ENUMS AND FLAGS 🌈

enum Gtk2::IconSize

Here's the whole roster, every single one, no skipping:

  • 'invalid' / GTK_ICON_SIZE_INVALID
  • 'menu' / GTK_ICON_SIZE_MENU
  • 'small-toolbar' / GTK_ICON_SIZE_SMALL_TOOLBAR
  • 'large-toolbar' / GTK_ICON_SIZE_LARGE_TOOLBAR
  • 'button' / GTK_ICON_SIZE_BUTTON
  • 'dnd' / GTK_ICON_SIZE_DND
  • 'dialog' / GTK_ICON_SIZE_DIALOG

Seven of them. A whole squad. πŸ˜­πŸ’œ


πŸ¦‹ SEE ALSO πŸ¦‹

Go read these too, iykyk:

  • Gtk2
  • Glib::Enum

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.


ok so legal stuff, but make it cute: LGPL, 2003–2011, gtk2-perl team. Respect the elders. πŸ™ˆ

and that's the whole page, bestie πŸ’– This one's from perl v5.42.0, dated 2025-07-25, and it's filed under User Contributed Perl Documentation β€” go forth and size those icons, you absolute legend 🧚⭐

πŸ“¦ where this page comes from