use adw Clamp for input

This commit is contained in:
yggverse 2024-10-16 12:40:38 +03:00
parent 9be583044f
commit 78c2765d2a
4 changed files with 14 additions and 12 deletions

View file

@ -9,7 +9,7 @@ impl Widget {
// Construct
pub fn new_arc() -> Arc<Self> {
let gobject = Button::builder()
.css_classes(["accent"])
//.css_classes(["accent"])
.halign(Align::End)
.label("Send")
.build();

View file

@ -1,16 +1,18 @@
use adw::ToolbarView;
use adw::Clamp;
use gtk::{prelude::WidgetExt, Box};
use std::sync::Arc;
pub struct Widget {
gobject: ToolbarView,
gobject: Clamp,
}
impl Widget {
// Construct
pub fn new_arc(content: &Box) -> Arc<Self> {
let gobject = ToolbarView::builder()
.content(content)
pub fn new_arc(child: &Box) -> Arc<Self> {
let gobject = Clamp::builder()
.child(child)
.css_classes(["app-notification"])
.maximum_size(800)
.visible(false)
.build();
@ -23,7 +25,7 @@ impl Widget {
}
// Getters
pub fn gobject(&self) -> &ToolbarView {
pub fn gobject(&self) -> &Clamp {
&self.gobject
}
}