diff --git a/docs/modules/Tray.md b/docs/modules/Tray.md index 9a90a45..e40dd04 100644 --- a/docs/modules/Tray.md +++ b/docs/modules/Tray.md @@ -6,11 +6,11 @@ Displays a fully interactive icon tray using the KDE `libappindicator` protocol. > Type: `tray` -| Name | Type | Default | Description | -|----------------------|-----------|-----------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `direction` | `string` | `left_to_right` if bar is horizontal, `top_to_bottom` otherwise | Direction to display the tray items. Possible values: `top_to_bottom`, `bottom_to_top`, `left_to_right`, `right_to_left` | -| `icon_size` | `integer` | `16` | Size in pixels to display tray icons as. | -| `prefer_theme_icons` | `bool` | `true` | Requests that icons from the theme be used over the item-provided item. Most items only provide one or the other so this will have no effect in most circumstances. | +| Name | Type | Default | Description | +|----------------------|------------------------------------------------------------|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `orientation` | `'horizontal'` or `'vertical'` (shorthand: `'h'` or `'v'`) | Matches bar orientation | The direction in which to pack tray icons. | +| `icon_size` | `integer` | `16` | Size in pixels to display tray icons as. | +| `prefer_theme_icons` | `bool` | `true` | Requests that icons from the theme be used over the item-provided item. Most items only provide one or the other so this will have no effect in most circumstances. |
JSON diff --git a/src/modules/tray/interface.rs b/src/modules/tray/interface.rs index 0cd3930..472a41c 100644 --- a/src/modules/tray/interface.rs +++ b/src/modules/tray/interface.rs @@ -1,11 +1,13 @@ +use glib::Propagation; +use gtk::gdk::Gravity; use gtk::prelude::*; -use gtk::{Image, Label, MenuItem}; +use gtk::{EventBox, Image, Label, MenuItem}; use system_tray::item::{IconPixmap, StatusNotifierItem, Tooltip}; /// Main tray icon to show on the bar pub(crate) struct TrayMenu { + pub event_box: EventBox, pub widget: MenuItem, - menu_widget: Option, image_widget: Option, label_widget: Option