Trait relm4::util::widget_plus::WidgetPlus
source · pub trait WidgetPlus {
// Required methods
fn set_margin_all(&self, margin: i32);
fn set_class_active(&self, class: &str, active: bool);
fn inline_css(&self, style_data: &[u8]);
fn try_remove(&self, widget: &impl IsA<Widget>) -> bool;
}
Expand description
Trait that extends gtk::prelude::WidgetExt
.
This trait’s main goal is to reduce redundant code and to provide helpful methods for the widgets macro of relm4-macros.
Required Methods§
sourcefn set_margin_all(&self, margin: i32)
fn set_margin_all(&self, margin: i32)
Set margin at start, end, top and bottom all at once.
sourcefn set_class_active(&self, class: &str, active: bool)
fn set_class_active(&self, class: &str, active: bool)
sourcefn inline_css(&self, style_data: &[u8])
fn inline_css(&self, style_data: &[u8])
Add inline CSS instructions to a widget.
widget.inline_css(b"border: 1px solid red");