Commit 77baa52b authored by Stepan Salenikovich's avatar Stepan Salenikovich Committed by Emmanuel Lepage Vallée

gnome: replace labels with icons on call control buttons

Also make the buttons round. This is in order to reduce the
size of the buttons to be able to add more.

Refs #76660

Change-Id: Ie7e62ffb22176c0da8c7b21d60fa8d4606638687
parent 744238ec
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>
\ No newline at end of file
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>
\ No newline at end of file
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0zm0 0h24v24H0z" fill="none"/>
<path d="M19 11h-1.7c0 .74-.16 1.43-.43 2.05l1.23 1.23c.56-.98.9-2.09.9-3.28zm-4.02.17c0-.06.02-.11.02-.17V5c0-1.66-1.34-3-3-3S9 3.34 9 5v.18l5.98 5.99zM4.27 3L3 4.27l6.01 6.01V11c0 1.66 1.33 3 2.99 3 .22 0 .44-.03.65-.08l1.66 1.66c-.71.33-1.5.52-2.31.52-2.76 0-5.3-2.1-5.3-5.1H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c.91-.13 1.77-.45 2.54-.9L19.73 21 21 19.73 4.27 3z"/>
</svg>
\ No newline at end of file
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>
\ No newline at end of file
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0zm0 0h24v24H0z" fill="none"/>
<path d="M21 6.5l-4 4V7c0-.55-.45-1-1-1H9.82L21 17.18V6.5zM3.27 2L2 3.27 4.73 6H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.21 0 .39-.08.54-.18L19.73 21 21 19.73 3.27 2z"/>
</svg>
\ No newline at end of file
......@@ -11,5 +11,10 @@
<file alias="contact">contact.svg</file>
<file alias="accept">accept.svg</file>
<file alias="reject">hang_up.svg</file>
<file alias="chat">ic_chat_black_24px.svg</file>
<file alias="mute_audio">ic_mic_off_black_24px.svg</file>
<file alias="mute_video">ic_videocam_off_black_24px.svg</file>
<file alias="pause">ic_pause_black_24px.svg</file>
<file alias="end">ic_clear_black_24px.svg</file>
</gresource>
</gresources>
\ No newline at end of file
</gresources>
......@@ -73,6 +73,8 @@ struct _CurrentCallViewPrivate
GtkWidget *entry_chat_input;
GtkWidget *scrolledwindow_chat;
GtkWidget *fullscreen_window;
GtkWidget *buttonbox_call_controls;
GtkWidget *button_hangup;
Call *call;
......@@ -169,6 +171,18 @@ current_call_view_init(CurrentCallView *view)
* the chat treeview */
GtkAdjustment *adjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(priv->scrolledwindow_chat));
g_signal_connect(adjustment, "changed", G_CALLBACK(scroll_to_bottom), NULL);
GtkCssProvider *provider = gtk_css_provider_new();
GdkDisplay *display = gdk_display_get_default();
GdkScreen *screen = gdk_display_get_default_screen(display);
gtk_css_provider_load_from_data(provider,
"GtkBox#call-controls GtkButton {\n"
" border-radius: 21px;\n"
"}\n"
, -1, NULL);
gtk_style_context_add_provider_for_screen(screen,
GTK_STYLE_PROVIDER(provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
static void
......@@ -190,6 +204,8 @@ current_call_view_class_init(CurrentCallViewClass *klass)
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), CurrentCallView, button_chat_input);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), CurrentCallView, entry_chat_input);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), CurrentCallView, scrolledwindow_chat);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), CurrentCallView, buttonbox_call_controls);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), CurrentCallView, button_hangup);
}
GtkWidget *
......
......@@ -191,21 +191,24 @@
<property name="border_width">10</property>
<!-- call conrol button box -->
<child>
<object class="GtkButtonBox" id="buttonbox_call_controls">
<object class="GtkBox" id="buttonbox_call_controls">
<property name="name">call-controls</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">start</property>
<style>
<class name="linked"/>
</style>
<property name="spacing">15</property>
<child>
<object class="GtkButton" id="button_hangup">
<property name="label" translatable="yes">Hang-up</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="width-request">42</property>
<property name="height-request">42</property>
<property name="action-name">app.hangup</property>
<property name="has_tooltip">True</property>
<property name="tooltip-text" translatable="yes">End this call</property>
<property name="image">image_end</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -214,11 +217,15 @@
</child>
<child>
<object class="GtkToggleButton" id="togglebutton_hold">
<property name="label" translatable="yes">Hold</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="width-request">42</property>
<property name="height-request">42</property>
<property name="action-name">app.hold</property>
<property name="has_tooltip">True</property>
<property name="tooltip-text" translatable="yes">Toggle hold</property>
<property name="image">image_pause</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -227,11 +234,15 @@
</child>
<child>
<object class="GtkToggleButton" id="togglebutton_muteaudio">
<property name="label" translatable="yes">Mute audio</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="width-request">42</property>
<property name="height-request">42</property>
<property name="action-name">app.mute_audio</property>
<property name="has_tooltip">True</property>
<property name="tooltip-text" translatable="yes">Toggle mute audio</property>
<property name="image">image_mute_audio</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -240,11 +251,15 @@
</child>
<child>
<object class="GtkToggleButton" id="togglebutton_mutevideo">
<property name="label" translatable="yes">Mute video</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="width-request">42</property>
<property name="height-request">42</property>
<property name="action-name">app.mute_video</property>
<property name="has_tooltip">True</property>
<property name="tooltip-text" translatable="yes">Toggle mute video</property>
<property name="image">image_mute_video</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -253,11 +268,14 @@
</child>
<child>
<object class="GtkToggleButton" id="togglebutton_record">
<property name="label" translatable="yes">Record</property>
<!-- TODO: set visible when feature enabled -->
<property name="visible">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="width-request">42</property>
<property name="height-request">42</property>
<property name="has_tooltip">True</property>
<property name="tooltip-text" translatable="yes">Toggle record</property>
<property name="action-name">app.record</property>
</object>
<packing>
......@@ -267,9 +285,13 @@
</child>
<child>
<object class="GtkToggleButton" id="togglebutton_chat">
<property name="label" translatable="yes">Chat</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="width-request">42</property>
<property name="height-request">42</property>
<property name="has_tooltip">True</property>
<property name="tooltip-text" translatable="yes">Toggle show chat</property>
<property name="image">image_chat</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -279,7 +301,7 @@
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="fill">False</property>
</packing>
</child>
<!-- end of call control button box -->
......@@ -291,4 +313,24 @@
</child>
<!-- end of box which contains the control buttons -->
</template>
<object class="GtkImage" id="image_chat">
<property name="visible">True</property>
<property name="resource">/cx/ring/RingGnome/chat</property>
</object>
<object class="GtkImage" id="image_mute_audio">
<property name="visible">True</property>
<property name="resource">/cx/ring/RingGnome/mute_audio</property>
</object>
<object class="GtkImage" id="image_mute_video">
<property name="visible">True</property>
<property name="resource">/cx/ring/RingGnome/mute_video</property>
</object>
<object class="GtkImage" id="image_pause">
<property name="visible">True</property>
<property name="resource">/cx/ring/RingGnome/pause</property>
</object>
<object class="GtkImage" id="image_end">
<property name="visible">True</property>
<property name="resource">/cx/ring/RingGnome/end</property>
</object>
</interface>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment