[rhythmbox: 1/2] header: make header buttons have uniform dimensions
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox: 1/2] header: make header buttons have uniform dimensions
- Date: Sun, 26 Sep 2021 22:04:07 +0000 (UTC)
commit cda6b5058ae9ca363bd03dc3195191409f604c25
Author: crvi <crvisqr gmail com>
Date: Sun Jul 18 11:14:54 2021 +0530
header: make header buttons have uniform dimensions
shell/rb-shell.c | 4 ++--
widgets/rb-header.c | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/shell/rb-shell.c b/shell/rb-shell.c
index 24e68f426..f45eef3e7 100644
--- a/shell/rb-shell.c
+++ b/shell/rb-shell.c
@@ -767,7 +767,7 @@ construct_load_ui (RBShell *shell)
model = rb_application_get_shared_menu (RB_APPLICATION (app), "app-menu");
gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (menu_button), model);
gtk_style_context_add_class (gtk_widget_get_style_context (menu_button), GTK_STYLE_CLASS_RAISED);
- g_object_set (menu_button, "margin-top", 12, "margin-bottom", 12, NULL);
+ gtk_widget_set_valign (menu_button, GTK_ALIGN_CENTER);
gtk_widget_add_accelerator (menu_button,
"activate",
@@ -777,7 +777,7 @@ construct_load_ui (RBShell *shell)
GTK_ACCEL_VISIBLE);
rb_application_set_menu_accelerators (shell->priv->application, model, TRUE);
- image = gtk_image_new_from_icon_name ("open-menu-symbolic", GTK_ICON_SIZE_LARGE_TOOLBAR);
+ image = gtk_image_new_from_icon_name ("open-menu-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_container_add (GTK_CONTAINER (menu_button), image);
shell->priv->menu_button = GTK_WIDGET (gtk_tool_item_new ());
diff --git a/widgets/rb-header.c b/widgets/rb-header.c
index 77e8433e9..0f8fb3a72 100644
--- a/widgets/rb-header.c
+++ b/widgets/rb-header.c
@@ -386,6 +386,7 @@ rb_header_constructed (GObject *object)
gtk_widget_set_no_show_all (header->priv->timelabel, TRUE);
header->priv->timebutton = gtk_button_new ();
+ gtk_widget_set_valign (header->priv->timebutton, GTK_ALIGN_CENTER);
gtk_button_set_relief (GTK_BUTTON (header->priv->timebutton), GTK_RELIEF_NONE);
gtk_container_add (GTK_CONTAINER (header->priv->timebutton), header->priv->timelabel);
g_signal_connect_object (header->priv->timebutton,
@@ -418,6 +419,7 @@ rb_header_constructed (GObject *object)
/* volume button */
header->priv->volume_button = gtk_volume_button_new ();
+ gtk_widget_set_valign (header->priv->volume_button, GTK_ALIGN_CENTER);
g_signal_connect (header->priv->volume_button, "value-changed",
G_CALLBACK (volume_widget_changed_cb),
header);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]