taffybar-3.2.1: A desktop bar similar to xmobar, but with more GUI

Safe HaskellNone
LanguageHaskell2010

System.Taffybar.Widget.Generic.AutoSizeImage

Synopsis

Documentation

getBorderInfo :: (MonadIO m, IsWidget a) => a -> m BorderInfo Source #

Get the total size of the border (the sum of its assigned margin, border and padding values) that will be drawn for a widget as a BorderInfo record.

getContentAllocation :: (MonadIO m, IsWidget a) => a -> BorderInfo -> m Rectangle Source #

Get the actual allocation for a Gtk.Widget, accounting for the size of its CSS assined margin, border and padding values.

autoSizeImage :: MonadIO m => Image -> (Int32 -> IO (Maybe Pixbuf)) -> Orientation -> m (IO ()) Source #

Automatically update the Gdk.Pixbuf of a Gtk.Image using the provided action whenever the Gtk.Image is allocated. Returns an action that forces a refresh of the image through the provided action.

autoSizeImageNew :: MonadIO m => (Int32 -> IO Pixbuf) -> Orientation -> m Image Source #

Make a new Gtk.Image and call "autoSizeImage" on it. Automatically scale the Gdk.Pixbuf returned from the provided getter to the appropriate size using "scalePixbufToSize".

imageMenuItemNew :: MonadIO m => Text -> (Int32 -> IO (Maybe Pixbuf)) -> m MenuItem Source #

Make a new Gtk.MenuItem that has both a label and an icon.