Use scrolled window for source view
This commit is contained in:
@ -262,6 +262,7 @@ impl NotifyWindow {
|
|||||||
let message = imp.entry.text();
|
let message = imp.entry.text();
|
||||||
relm4_macros::view! {
|
relm4_macros::view! {
|
||||||
window = adw::Window {
|
window = adw::Window {
|
||||||
|
set_default_height: 400,
|
||||||
set_modal: true,
|
set_modal: true,
|
||||||
set_transient_for: Some(self),
|
set_transient_for: Some(self),
|
||||||
#[wrap(Some)]
|
#[wrap(Some)]
|
||||||
@ -293,19 +294,22 @@ impl NotifyWindow {
|
|||||||
set_xalign: 0.0,
|
set_xalign: 0.0,
|
||||||
set_halign: gtk::Align::Start,
|
set_halign: gtk::Align::Start,
|
||||||
},
|
},
|
||||||
append: text_view = &gsv::View {
|
append = >k::ScrolledWindow {
|
||||||
add_css_class: "code",
|
#[wrap(Some)]
|
||||||
set_tab_width: 4,
|
set_child: text_view = &gsv::View {
|
||||||
set_indent_width: 2,
|
add_css_class: "code",
|
||||||
set_auto_indent: true,
|
set_tab_width: 4,
|
||||||
set_top_margin: 4,
|
set_indent_width: 2,
|
||||||
set_bottom_margin: 4,
|
set_auto_indent: true,
|
||||||
set_left_margin: 4,
|
set_top_margin: 4,
|
||||||
set_right_margin: 4,
|
set_bottom_margin: 4,
|
||||||
set_hexpand: true,
|
set_left_margin: 4,
|
||||||
set_vexpand: true,
|
set_right_margin: 4,
|
||||||
set_monospace: true,
|
set_hexpand: true,
|
||||||
set_background_pattern: gsv::BackgroundPatternType::Grid
|
set_vexpand: true,
|
||||||
|
set_monospace: true,
|
||||||
|
set_background_pattern: gsv::BackgroundPatternType::Grid
|
||||||
|
},
|
||||||
},
|
},
|
||||||
append = >k::Label {
|
append = >k::Label {
|
||||||
add_css_class: "heading",
|
add_css_class: "heading",
|
||||||
@ -313,8 +317,9 @@ impl NotifyWindow {
|
|||||||
set_xalign: 0.0,
|
set_xalign: 0.0,
|
||||||
set_halign: gtk::Align::Start,
|
set_halign: gtk::Align::Start,
|
||||||
},
|
},
|
||||||
append = >k::Box {
|
append = >k::FlowBox {
|
||||||
set_spacing: 4,
|
set_column_spacing: 4,
|
||||||
|
set_row_spacing: 4,
|
||||||
append = >k::Button {
|
append = >k::Button {
|
||||||
add_css_class: "pill",
|
add_css_class: "pill",
|
||||||
add_css_class: "small",
|
add_css_class: "small",
|
||||||
|
|||||||
Reference in New Issue
Block a user