pub struct Tray { /* private fields */ }Expand description
The system tray: one icon button per tray item, in the order the items registered. A left click activates an item, or opens its menu when the item is only a menu. A right click opens the menu, a middle click is the item’s secondary activation, and scrolling over an icon scrolls it.
A menu opens as a PopupWindow holding a Menu, next to its icon.
Clicking an entry tells the app and closes the menu.
use crabshell_services::Tray;
let tray = Tray::new().icon_size(18);Implementations§
Source§impl Tray
impl Tray
Sourcepub fn icon_size(self, size: impl IntoProp<u32>) -> Tray
pub fn icon_size(self, size: impl IntoProp<u32>) -> Tray
Sets the icons’ size in logical pixels.
Sets the style of each menu’s popup: its background, border, padding, and the text’s color and font. The default is light text on dark gray.
Sourcepub fn visible(self, visible: impl IntoProp<bool>) -> Tray
pub fn visible(self, visible: impl IntoProp<bool>) -> Tray
Shows or hides the tray, as Row::visible does for a row.
Sourcepub fn geometry(self, geometry: Signal<Rect>) -> Tray
pub fn geometry(self, geometry: Signal<Rect>) -> Tray
Shares where the tray is after each layout that moves it, as
Row::geometry does for a row.
Sourcepub fn mapped_geometry(self, geometry: Signal<Rect>) -> Tray
pub fn mapped_geometry(self, geometry: Signal<Rect>) -> Tray
Shares where the tray is drawn, through every transform, as
Row::mapped_geometry does for a row.
Trait Implementations§
Source§impl Widget for Tray
impl Widget for Tray
Source§fn into_element(self: Box<Self>) -> Element
fn into_element(self: Box<Self>) -> Element
Auto Trait Implementations§
impl !RefUnwindSafe for Tray
impl !Send for Tray
impl !Sync for Tray
impl !UnwindSafe for Tray
impl Forget for Tray
impl Freeze for Tray
impl Move for Tray
impl Unpin for Tray
impl UnsafeUnpin for Tray
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
Source§type NoneType = T
type NoneType = T
NoneValue::null_value produces.