Overlay on URL hover. Bumps Gtk+ version to 3.2. Closes #4703
This commit is contained in:
parent
63c9ac6f6b
commit
408a2c9e8a
3 changed files with 14 additions and 11 deletions
2
THANKS
2
THANKS
|
|
@ -2,4 +2,4 @@ The Geary team would like to thank the following contributors:
|
|||
|
||||
Charles Lindsay <chaz@yorba.org>
|
||||
Nate Lillich <nate@yorba.org>
|
||||
|
||||
Christian Dywan <christian@twotoasts.de>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ public class MainWindow : Gtk.Window {
|
|||
public MainToolbar main_toolbar { get; private set; }
|
||||
public MessageListView message_list_view { get; private set; }
|
||||
public MessageViewer message_viewer { get; private set; default = new MessageViewer(); }
|
||||
private Gtk.Label message_overlay_label;
|
||||
|
||||
private int window_width;
|
||||
private int window_height;
|
||||
|
|
@ -121,7 +122,16 @@ public class MainWindow : Gtk.Window {
|
|||
// three-pane display: message list left of current message on bottom separated by
|
||||
// grippable
|
||||
messages_paned.pack1(status_bar_box, false, false);
|
||||
messages_paned.pack2(message_viewer_scrolled, true, true);
|
||||
|
||||
Gtk.Overlay message_overlay = new Gtk.Overlay();
|
||||
message_overlay.add(message_viewer_scrolled);
|
||||
messages_paned.pack2(message_overlay, true, true);
|
||||
|
||||
message_overlay_label = new Gtk.Label(null);
|
||||
message_overlay_label.ellipsize = Pango.EllipsizeMode.MIDDLE;
|
||||
message_overlay_label.halign = Gtk.Align.START;
|
||||
message_overlay_label.valign = Gtk.Align.END;
|
||||
message_overlay.add_overlay(message_overlay_label);
|
||||
|
||||
main_layout.pack_end(messages_paned, true, true, 0);
|
||||
|
||||
|
|
@ -129,14 +139,7 @@ public class MainWindow : Gtk.Window {
|
|||
}
|
||||
|
||||
private void on_link_hover(string? link) {
|
||||
tooltip_text = link;
|
||||
trigger_tooltip_query();
|
||||
}
|
||||
|
||||
public override bool query_tooltip(int x, int y, bool keyboard_tooltip, Gtk.Tooltip tooltip) {
|
||||
tooltip.set_text(tooltip_text);
|
||||
|
||||
return true;
|
||||
message_overlay_label.label = link;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
2
wscript
2
wscript
|
|
@ -49,7 +49,7 @@ def configure(conf):
|
|||
conf.check_cfg(
|
||||
package='gtk+-3.0',
|
||||
uselib_store='GTK',
|
||||
atleast_version='3.0.',
|
||||
atleast_version='3.2.',
|
||||
mandatory=1,
|
||||
args='--cflags --libs')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue