feat(css): add style for TextView and generic css

Generic CSS includes styles for text_view.css and info_bar.css
This commit is contained in:
doryan 2024-08-14 18:48:36 +04:00
parent 269b30312d
commit 23bfd10e2b
3 changed files with 18 additions and 1 deletions

2
src/view/styles/base.css Normal file
View File

@ -0,0 +1,2 @@
@import url("info_bar.css");
@import url("text_view.css");

View File

@ -9,7 +9,8 @@ use gtk::{
pub fn load_css() {
let style_provider = CssProvider::new();
style_provider.load_from_path(Path::new("./src/view/styles/info_bar.css"));
style_provider.load_from_path(Path::new("./src/view/styles/base.css"));
style_context_add_provider_for_display(
&Display::default().expect("Could not connect to a display"),

View File

@ -0,0 +1,14 @@
textview {
border-radius: 5px;
padding: 5px;
background: #E6E6E6;
outline-offset: 2px;
outline: 2px solid #81ABDF00;
transition-duration: .15s;
transition-timing-function: ease-in-out;
}
textview:focus-within {
outline-offset: -2px;
outline: 2px solid #81ABDF;
}