Add headerbar button tooltips, don't remove relief

This commit is contained in:
fiaxh 2019-03-16 22:25:46 +01:00
parent 26a8538e97
commit 330649a537
6 changed files with 9 additions and 3 deletions

View file

@ -13,6 +13,7 @@
<property name="visible">True</property>
<child>
<object class="GtkMenuButton" id="add_button">
<property name="tooltip_text" translatable="yes">Start Conversation</property>
<property name="relief">none</property>
<property name="visible">True</property>
<child>

View file

@ -9,6 +9,7 @@
</style>
<child>
<object class="GtkMenuButton" id="add_button">
<property name="tooltip_text" translatable="yes">Start Conversation</property>
<property name="visible">True</property>
<child>
<object class="GtkImage">
@ -24,7 +25,6 @@
</child>
<child>
<object class="GtkMenuButton" id="menu_button">
<property name="relief">none</property>
<property name="valign">center</property>
<property name="visible">True</property>
<child>

View file

@ -42,6 +42,11 @@ class MenuWidget : Button, Plugins.ConversationTitlebarWidget {
public new void set_conversation(Conversation conversation) {
this.conversation = conversation;
if (conversation.type_ == Conversation.Type.GROUPCHAT) {
tooltip_text = "Channel details";
} else {
tooltip_text = "Conversation details";
}
}
}

View file

@ -34,6 +34,7 @@ class OccupantsWidget : MenuButton, Plugins.ConversationTitlebarWidget {
public OccupantsWidget(StreamInteractor stream_interactor) {
image = new Image.from_icon_name("system-users-symbolic", IconSize.MENU);
tooltip_text = _("Members");
this.stream_interactor = stream_interactor;
set_use_popover(true);

View file

@ -8,7 +8,7 @@ namespace Dino.Ui {
public class SearchMenuEntry : Plugins.ConversationTitlebarEntry, Object {
public string id { get { return "search"; } }
public GlobalSearchButton search_button = new GlobalSearchButton() { visible = true };
public GlobalSearchButton search_button = new GlobalSearchButton() { tooltip_text=_("Search messages"), visible = true };
public SearchMenuEntry() {
search_button.set_image(new Gtk.Image.from_icon_name("system-search-symbolic", Gtk.IconSize.MENU) { visible = true });

View file

@ -28,7 +28,6 @@ public class ConversationTitlebarCsd : Gtk.HeaderBar {
}
foreach (var w in widgets) {
Button gtk_widget = (Gtk.Button)w;
gtk_widget.relief = ReliefStyle.NONE;
this.pack_end(gtk_widget);
}
}