[Xfce4-commits] [xfce/xfce4-settings] 01/01: settings-editor: Add consistent inline-toolbar
noreply at xfce.org
noreply at xfce.org
Wed Nov 6 00:51:15 CET 2019
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfce4-settings.
commit 05e089e738c714fc3d42a2a765a3399c3f12395f
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Nov 6 00:50:20 2019 +0100
settings-editor: Add consistent inline-toolbar
The inline toolbar is now consistent with other UIs in Xfce.
---
xfce4-settings-editor/xfce-settings-editor-box.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/xfce4-settings-editor/xfce-settings-editor-box.c b/xfce4-settings-editor/xfce-settings-editor-box.c
index 4251baf..a802155 100644
--- a/xfce4-settings-editor/xfce-settings-editor-box.c
+++ b/xfce4-settings-editor/xfce-settings-editor-box.c
@@ -190,6 +190,7 @@ xfce_settings_editor_box_init (XfceSettingsEditorBox *self)
GtkWidget *vbox;
GtkWidget *bbox;
GtkWidget *button;
+ GtkWidget *image;
GtkCssProvider *provider;
self->channels_store = gtk_list_store_new (N_CHANNEL_COLUMNS,
@@ -252,7 +253,7 @@ xfce_settings_editor_box_init (XfceSettingsEditorBox *self)
_("Channel"), render,
"text", CHANNEL_COLUMN_NAME, NULL);
- vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_paned_add2 (GTK_PANED (paned), vbox);
gtk_widget_show (vbox);
@@ -314,12 +315,14 @@ xfce_settings_editor_box_init (XfceSettingsEditorBox *self)
G_CALLBACK (xfce_settings_editor_box_value_changed), self);
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
- gtk_box_set_spacing (GTK_BOX (bbox), 12);
gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, TRUE, 0);
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_START);
+ gtk_style_context_add_class (gtk_widget_get_style_context (bbox), "inline-toolbar");
gtk_widget_show (bbox);
- button = xfce_gtk_button_new_mixed ("list-add", _("New"));
+ button = gtk_button_new ();
+ image = gtk_image_new_from_icon_name ("list-add-symbolic", GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image (GTK_BUTTON (button), GTK_IMAGE (image));
gtk_container_add (GTK_CONTAINER (bbox), button);
gtk_button_box_set_child_non_homogeneous (GTK_BUTTON_BOX (bbox), button, TRUE);
gtk_widget_set_tooltip_text (button, _("New property"));
@@ -330,7 +333,9 @@ xfce_settings_editor_box_init (XfceSettingsEditorBox *self)
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (xfce_settings_editor_box_property_new), self);
- button = xfce_gtk_button_new_mixed ("gtk-edit", _("Edit"));
+ button = gtk_button_new ();
+ image = gtk_image_new_from_icon_name ("document-edit-symbolic", GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image (button, image);
gtk_container_add (GTK_CONTAINER (bbox), button);
gtk_button_box_set_child_non_homogeneous (GTK_BUTTON_BOX (bbox), button, TRUE);
gtk_widget_set_tooltip_text (button, _("Edit selected property"));
@@ -341,7 +346,9 @@ xfce_settings_editor_box_init (XfceSettingsEditorBox *self)
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (xfce_settings_editor_box_property_edit), self);
- button = xfce_gtk_button_new_mixed ("document-revert", _("_Reset"));
+ button = gtk_button_new ();
+ image = gtk_image_new_from_icon_name ("document-revert-symbolic", GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image (button, image);
gtk_container_add (GTK_CONTAINER (bbox), button);
gtk_button_box_set_child_non_homogeneous (GTK_BUTTON_BOX (bbox), button, TRUE);
gtk_widget_set_tooltip_text (button, _("Reset selected property"));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list