[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 01/04: Remove unnecessary GtkAlignment.
noreply at xfce.org
noreply at xfce.org
Sun Jan 26 23:27:50 CET 2020
This is an automated email from the git hooks/post-receive script.
g o t t c o d e 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 panel-plugins/xfce4-whiskermenu-plugin.
commit e3778ba2c7bf04bed3126005a8a7a965b9631353
Author: Graeme Gott <graeme at gottcode.org>
Date: Sun Jan 26 17:19:20 2020 -0500
Remove unnecessary GtkAlignment.
---
panel-plugin/configuration-dialog.cpp | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/panel-plugin/configuration-dialog.cpp b/panel-plugin/configuration-dialog.cpp
index 31f50e6..a1ab2d3 100644
--- a/panel-plugin/configuration-dialog.cpp
+++ b/panel-plugin/configuration-dialog.cpp
@@ -57,16 +57,23 @@ static void whiskermenu_config_dialog_delete(ConfigurationDialog* dialog)
//-----------------------------------------------------------------------------
-static GtkWidget* make_aligned_frame(const gchar* label, GtkWidget* content)
+static GtkWidget* make_aligned_frame(const gchar* text, GtkWidget* content)
{
- GtkWidget* alignment;
- GtkWidget* frame;
-
- frame = xfce_gtk_frame_box_new(label, &alignment);
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 6, 0, 12, 0);
-G_GNUC_END_IGNORE_DEPRECATIONS
- gtk_container_add(GTK_CONTAINER(alignment), GTK_WIDGET(content));
+ // Create bold label
+ gchar* markup = g_markup_printf_escaped("<b>%s</b>", text);
+ GtkWidget* label = gtk_label_new(NULL);
+ gtk_label_set_markup(GTK_LABEL(label), markup);
+ g_free(markup);
+
+ // Create frame
+ GtkWidget* frame = gtk_frame_new(NULL);
+ gtk_frame_set_label_widget(GTK_FRAME(frame), label);
+ gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_NONE);
+
+ // Add content
+ gtk_widget_set_margin_start(content, 12);
+ gtk_widget_set_margin_top(content, 6);
+ gtk_container_add(GTK_CONTAINER(frame), content);
return frame;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list