gtk/style_context.rs
1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use crate::StateFlags;
4use crate::StyleContext;
5use crate::prelude::*;
6use pango::FontDescription;
7
8pub trait StyleContextExtManual: IsA<StyleContext> + 'static {
9 #[doc(alias = "get_font")]
10 fn font(&self, state: StateFlags) -> FontDescription {
11 self.style_property_for_state("font", state)
12 .get()
13 .expect("font property is not pango::FontDescription")
14 }
15}
16
17impl<O: IsA<StyleContext>> StyleContextExtManual for O {}