feat(stylesheets): add stylesheet for info bar
This commit is contained in:
parent
f88946b507
commit
7264b704d0
|
@ -0,0 +1,3 @@
|
|||
.info_box{
|
||||
background-color: yellow;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
use adw::gdk::Display;
|
||||
use gtk4 as gtk;
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
use gtk::{
|
||||
style_context_add_provider_for_display, CssProvider, STYLE_PROVIDER_PRIORITY_APPLICATION,
|
||||
};
|
||||
|
||||
pub fn load_css() {
|
||||
let style_provider = CssProvider::new();
|
||||
style_provider.load_from_path(Path::new("./src/view/styles/info_bar.css"));
|
||||
|
||||
style_context_add_provider_for_display(
|
||||
&Display::default().expect("Could not connect to a display"),
|
||||
&style_provider,
|
||||
STYLE_PROVIDER_PRIORITY_APPLICATION,
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue