Remove composer's scrolled window since WebView now scrolls internally.
We can't easily wrap ComposerWebView in a GtkScrolledWindow, since we don't any notifications that the cursor has moved offscreen and hence the view needs to be scrolled, so let the view do its own scrolling. * ui/composer-widget.ui: Replace editor_scrolled with editor_container, update uses.
This commit is contained in:
parent
6433582903
commit
9e171d0db1
3 changed files with 12 additions and 12 deletions
|
|
@ -63,12 +63,9 @@ public class ComposerEmbed : Gtk.EventBox, ComposerContainer {
|
|||
private void on_realize() {
|
||||
update_style();
|
||||
|
||||
this.composer.editor_scrolled.get_vscrollbar().hide();
|
||||
|
||||
//this.composer.editor.vadjustment.value_changed.connect(on_inner_scroll);
|
||||
//this.composer.editor.vadjustment.changed.connect(on_adjust_changed);
|
||||
//this.composer.editor.user_changed_contents.connect(on_inner_size_changed);
|
||||
|
||||
reroute_scroll_handling(this);
|
||||
}
|
||||
|
||||
|
|
@ -116,7 +113,6 @@ public class ComposerEmbed : Gtk.EventBox, ComposerContainer {
|
|||
//this.composer.editor.user_changed_contents.disconnect(on_inner_size_changed);
|
||||
|
||||
disable_scroll_reroute(this);
|
||||
this.composer.editor_scrolled.get_vscrollbar().show();
|
||||
|
||||
remove(this.composer);
|
||||
close_container();
|
||||
|
|
|
|||
|
|
@ -245,15 +245,16 @@ public class ComposerWidget : Gtk.EventBox {
|
|||
|
||||
public Configuration config { get; set; }
|
||||
|
||||
[GtkChild]
|
||||
internal Gtk.ScrolledWindow editor_scrolled;
|
||||
|
||||
private ContactListStore? contact_list_store = null;
|
||||
|
||||
private string body_html = "";
|
||||
|
||||
[GtkChild]
|
||||
private Gtk.Box composer_container;
|
||||
|
||||
[GtkChild]
|
||||
internal Gtk.Grid editor_container;
|
||||
|
||||
[GtkChild]
|
||||
private Gtk.Label from_label;
|
||||
[GtkChild]
|
||||
|
|
@ -435,6 +436,11 @@ public class ComposerWidget : Gtk.EventBox {
|
|||
this.to_entry.margin_top = this.cc_entry.margin_top = this.bcc_entry.margin_top = this.reply_to_entry.margin_top = 6;
|
||||
|
||||
this.editor = new ComposerWebView(config);
|
||||
this.editor.set_hexpand(true);
|
||||
this.editor.set_vexpand(true);
|
||||
this.editor.show();
|
||||
|
||||
this.editor_container.add(this.editor);
|
||||
|
||||
// Initialize menus
|
||||
Gtk.Builder builder = new Gtk.Builder.from_resource(
|
||||
|
|
@ -499,8 +505,6 @@ public class ComposerWidget : Gtk.EventBox {
|
|||
this.editor.mouse_target_changed.connect(on_mouse_target_changed);
|
||||
this.editor.selection_changed.connect((has_selection) => { update_cursor_actions(); });
|
||||
|
||||
this.editor_scrolled.add(editor);
|
||||
|
||||
// Place the message area before the compose toolbar in the focus chain, so that
|
||||
// the user can tab directly from the Subject: field to the message area.
|
||||
// TODO: after bumping the min. GTK+ version to 3.16, we can/should do this in the UI file.
|
||||
|
|
|
|||
|
|
@ -714,10 +714,10 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="editor_scrolled">
|
||||
<object class="GtkGrid" id="editor_container">
|
||||
<property name="height_request">250</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="min_content_height">200</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue