mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 08:35:28 +00:00
remove ugly gnome's ScrolledWindow + TextView integration
This commit is contained in:
parent
ffb1474c7e
commit
4a94cd4161
3 changed files with 5 additions and 17 deletions
|
|
@ -61,13 +61,7 @@ impl Input {
|
|||
title: Option<&str>,
|
||||
size_limit: Option<usize>,
|
||||
) {
|
||||
self.update(Some(>k::Box::response(
|
||||
action,
|
||||
base,
|
||||
title,
|
||||
size_limit,
|
||||
MAX_CONTENT_HEIGHT,
|
||||
)));
|
||||
self.update(Some(>k::Box::response(action, base, title, size_limit)));
|
||||
}
|
||||
|
||||
pub fn set_new_sensitive(
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ pub trait Response {
|
|||
base: Uri,
|
||||
title: Option<&str>,
|
||||
size_limit: Option<usize>,
|
||||
max_content_height: i32,
|
||||
) -> Self;
|
||||
}
|
||||
|
||||
|
|
@ -36,7 +35,6 @@ impl Response for Box {
|
|||
base: Uri,
|
||||
title: Option<&str>,
|
||||
size_limit: Option<usize>,
|
||||
max_content_height: i32,
|
||||
) -> Self {
|
||||
// Init components
|
||||
let control = Rc::new(Control::build());
|
||||
|
|
@ -49,18 +47,12 @@ impl Response for Box {
|
|||
.margin_end(MARGIN)
|
||||
.margin_start(MARGIN)
|
||||
.margin_top(MARGIN)
|
||||
.spacing(SPACING)
|
||||
.orientation(Orientation::Vertical)
|
||||
.spacing(SPACING)
|
||||
.build();
|
||||
|
||||
g_box.append(&title);
|
||||
g_box.append(
|
||||
>k::ScrolledWindow::builder()
|
||||
.child(&text_view)
|
||||
.max_content_height(max_content_height)
|
||||
.propagate_natural_height(true)
|
||||
.build(),
|
||||
);
|
||||
g_box.append(&text_view);
|
||||
g_box.append(&control.g_box);
|
||||
|
||||
// Init events
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ impl Form for TextView {
|
|||
.css_classes(["frame", "view"])
|
||||
.extra_menu(&adapter.menu_model())
|
||||
.left_margin(MARGIN)
|
||||
.margin_bottom(MARGIN / 4)
|
||||
.right_margin(MARGIN)
|
||||
.top_margin(MARGIN)
|
||||
.valign(gtk::Align::BaselineCenter)
|
||||
|
|
@ -43,6 +44,7 @@ impl Form for TextView {
|
|||
.build();
|
||||
|
||||
text_view.insert_action_group("spelling", Some(&adapter));
|
||||
text_view.set_size_request(-1, 36); // @TODO [#635](https://gitlab.gnome.org/GNOME/pygobject/-/issues/635)
|
||||
|
||||
// Init events
|
||||
text_view.connect_realize(|this| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue