replace app-notification class with `osd

This commit is contained in:
yggverse 2024-12-16 13:26:01 +02:00
parent 105c1ca7a5
commit 74322fb850
6 changed files with 16 additions and 2 deletions

View File

@ -33,7 +33,7 @@ impl Search {
// Init main container // Init main container
let g_box = Box::builder() let g_box = Box::builder()
.css_classes(["app-notification"]) .css_classes(["osd"])
.orientation(Orientation::Horizontal) .orientation(Orientation::Horizontal)
.visible(false) .visible(false)
.build(); .build();

View File

@ -6,8 +6,10 @@ pub fn new() -> Button {
Button::builder() Button::builder()
.cursor(&Cursor::from_name("default", None).unwrap()) .cursor(&Cursor::from_name("default", None).unwrap())
.icon_name("window-close-symbolic") .icon_name("window-close-symbolic")
.margin_bottom(MARGIN)
.margin_end(MARGIN) .margin_end(MARGIN)
.margin_start(MARGIN) .margin_start(MARGIN)
.margin_top(MARGIN)
.tooltip_text("Close find bar") .tooltip_text("Close find bar")
.build() .build()
} }

View File

@ -1,5 +1,7 @@
use gtk::{gdk::Cursor, prelude::WidgetExt, Button}; use gtk::{gdk::Cursor, prelude::WidgetExt, Button};
const MARGIN: i32 = 6;
pub struct Back { pub struct Back {
pub button: Button, pub button: Button,
} }
@ -13,6 +15,8 @@ impl Back {
button: Button::builder() button: Button::builder()
.cursor(&Cursor::from_name("default", None).unwrap()) .cursor(&Cursor::from_name("default", None).unwrap())
.icon_name("go-up-symbolic") .icon_name("go-up-symbolic")
.margin_bottom(MARGIN)
.margin_top(MARGIN)
.sensitive(false) .sensitive(false)
.tooltip_text("Back") .tooltip_text("Back")
.build(), .build(),

View File

@ -1,4 +1,7 @@
use gtk::{gdk::Cursor, prelude::WidgetExt, Button}; use gtk::{gdk::Cursor, prelude::WidgetExt, Button};
const MARGIN: i32 = 6;
pub struct Forward { pub struct Forward {
pub button: Button, pub button: Button,
} }
@ -12,6 +15,8 @@ impl Forward {
button: Button::builder() button: Button::builder()
.cursor(&Cursor::from_name("default", None).unwrap()) .cursor(&Cursor::from_name("default", None).unwrap())
.icon_name("go-down-symbolic") .icon_name("go-down-symbolic")
.margin_bottom(MARGIN)
.margin_top(MARGIN)
.sensitive(false) .sensitive(false)
.tooltip_text("Forward") .tooltip_text("Forward")
.build(), .build(),

View File

@ -4,6 +4,8 @@ use gtk::{
Button, Button,
}; };
const MARGIN: i32 = 6;
pub struct Widget { pub struct Widget {
pub button: Button, pub button: Button,
} }
@ -15,6 +17,7 @@ impl Widget {
let button = Button::builder() let button = Button::builder()
//.css_classes(["accent"]) //.css_classes(["accent"])
.label("Send") .label("Send")
.margin_bottom(MARGIN)
.build(); .build();
// Init events // Init events

View File

@ -9,7 +9,7 @@ impl Widget {
// Construct // Construct
pub fn new() -> Self { pub fn new() -> Self {
let clamp = Clamp::builder() let clamp = Clamp::builder()
.css_classes(["app-notification"]) .css_classes(["osd"])
.maximum_size(800) .maximum_size(800)
.visible(false) .visible(false)
.build(); .build();