fix(css): after compile with --release profile css works

This commit is contained in:
doryan 2024-08-16 13:53:43 +04:00
parent 4c07134d9e
commit 5dde8ab20c

View File

@ -1,8 +1,6 @@
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,
};
@ -10,7 +8,7 @@ use gtk::{
pub fn load_css() {
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(
&Display::default().expect("Could not connect to a display"),