fix(css): after compile with --release profile css works
This commit is contained in:
parent
4c07134d9e
commit
5dde8ab20c
|
@ -1,8 +1,6 @@
|
||||||
use adw::gdk::Display;
|
use adw::gdk::Display;
|
||||||
use gtk4 as gtk;
|
use gtk4 as gtk;
|
||||||
|
|
||||||
use std::path::Path;
|
|
||||||
|
|
||||||
use gtk::{
|
use gtk::{
|
||||||
style_context_add_provider_for_display, CssProvider, STYLE_PROVIDER_PRIORITY_APPLICATION,
|
style_context_add_provider_for_display, CssProvider, STYLE_PROVIDER_PRIORITY_APPLICATION,
|
||||||
};
|
};
|
||||||
|
@ -10,7 +8,7 @@ use gtk::{
|
||||||
pub fn load_css() {
|
pub fn load_css() {
|
||||||
let style_provider = CssProvider::new();
|
let style_provider = CssProvider::new();
|
||||||
|
|
||||||
style_provider.load_from_path(Path::new("./src/view/styles/base.css"));
|
style_provider.load_from_string(include_str!("base.css"));
|
||||||
|
|
||||||
style_context_add_provider_for_display(
|
style_context_add_provider_for_display(
|
||||||
&Display::default().expect("Could not connect to a display"),
|
&Display::default().expect("Could not connect to a display"),
|
||||||
|
|
Loading…
Reference in New Issue