1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-02 10:29:25 +00:00

call-display: Make the buttons match the new design

Add 'mute' and 'dial pad' buttons, drop the 'hold' button, change the
size of the central buttons, make them use icons and drop the now
useless group size.
This commit is contained in:
Adrien Plazas 2018-07-27 13:06:17 +02:00
parent b104483d3a
commit 7c974d38ed
2 changed files with 42 additions and 19 deletions

View file

@ -48,7 +48,7 @@ struct _CallsCallDisplay
GtkLabel *time;
GtkButton *answer;
GtkToggleButton *hold;
GtkToggleButton *mute;
GtkButton *hang_up;
GtkToggleButton *speaker;
};
@ -87,7 +87,7 @@ hang_up_clicked_cb (GtkButton *button,
}
static void
hold_toggled_cb (GtkToggleButton *togglebutton,
mute_toggled_cb (GtkToggleButton *togglebutton,
CallsCallDisplay *self)
{
}
@ -167,7 +167,7 @@ call_state_changed_cb (CallsCallDisplay *self,
{
case CALLS_CALL_STATE_INCOMING:
gtk_widget_show (GTK_WIDGET (self->answer));
gtk_widget_hide (GTK_WIDGET (self->hold));
gtk_widget_hide (GTK_WIDGET (self->mute));
gtk_widget_hide (GTK_WIDGET (self->speaker));
break;
case CALLS_CALL_STATE_ACTIVE:
@ -176,7 +176,7 @@ call_state_changed_cb (CallsCallDisplay *self,
case CALLS_CALL_STATE_ALERTING:
case CALLS_CALL_STATE_WAITING:
gtk_widget_hide (GTK_WIDGET (self->answer));
gtk_widget_show (GTK_WIDGET (self->hold));
gtk_widget_show (GTK_WIDGET (self->mute));
gtk_widget_show (GTK_WIDGET (self->speaker));
break;
case CALLS_CALL_STATE_DISCONNECTED:
@ -324,11 +324,11 @@ calls_call_display_class_init (CallsCallDisplayClass *klass)
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, status);
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, time);
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, answer);
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, hold);
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, mute);
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, hang_up);
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, speaker);
gtk_widget_class_bind_template_callback (widget_class, answer_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, hang_up_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, hold_toggled_cb);
gtk_widget_class_bind_template_callback (widget_class, mute_toggled_cb);
gtk_widget_class_bind_template_callback (widget_class, speaker_toggled_cb);
}

View file

@ -78,32 +78,61 @@
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<property name="homogeneous">True</property>
<property name="height_request">65</property>
<property name="margin_bottom">65</property>
<child>
<object class="GtkToggleButton" id="hold">
<property name="label" translatable="yes">Hold</property>
<object class="GtkToggleButton" id="mute">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<signal name="toggled" handler="hold_toggled_cb" swapped="no"/>
<signal name="toggled" handler="mute_toggled_cb" swapped="no"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">microphone-sensitivity-muted-symbolic</property>
<property name="icon_size">3</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkToggleButton" id="dial_pad">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">input-dialpad-symbolic</property>
<property name="icon_size">3</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkToggleButton" id="speaker">
<property name="label" translatable="yes">Speaker</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<signal name="toggled" handler="speaker_toggled_cb" swapped="no"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">audio-volume-high-symbolic</property>
<property name="icon_size">3</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="hang_up">
@ -137,10 +166,4 @@
</object>
</child>
</template>
<object class="GtkSizeGroup" id="action_buttons">
<widgets>
<widget name="hold"/>
<widget name="speaker"/>
</widgets>
</object>
</interface>