[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 451/473: Add opacity setting to configuration dialog. Closes #87
noreply at xfce.org
noreply at xfce.org
Tue Feb 17 00:00:21 CET 2015
This is an automated email from the git hooks/post-receive script.
gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit e28d9bfabeb27d6fc80669b65c76a8ad9ef74952
Author: Graeme Gott <graeme at gottcode.org>
Date: Sun Feb 8 14:57:54 2015 -0500
Add opacity setting to configuration dialog. Closes #87
---
panel-plugin/configuration-dialog.cpp | 23 +++++++++++++++++++++++
panel-plugin/configuration-dialog.h | 3 +++
2 files changed, 26 insertions(+)
diff --git a/panel-plugin/configuration-dialog.cpp b/panel-plugin/configuration-dialog.cpp
index d07e9b9..9a3b484 100644
--- a/panel-plugin/configuration-dialog.cpp
+++ b/panel-plugin/configuration-dialog.cpp
@@ -266,6 +266,14 @@ void ConfigurationDialog::toggle_display_recent(GtkToggleButton* button)
//-----------------------------------------------------------------------------
+void ConfigurationDialog::background_opacity_changed(GtkRange* range)
+{
+ wm_settings->menu_opacity = gtk_range_get_value(range);
+ wm_settings->set_modified();
+}
+
+//-----------------------------------------------------------------------------
+
SearchAction* ConfigurationDialog::get_selected_action(GtkTreeIter* iter) const
{
GtkTreeIter selected_iter;
@@ -601,6 +609,21 @@ GtkWidget* ConfigurationDialog::init_appearance_tab()
gtk_label_set_mnemonic_widget(GTK_LABEL(label), m_category_icon_size);
g_signal_connect_slot(m_category_icon_size, "changed", &ConfigurationDialog::category_icon_size_changed, this);
+ // Add option to control background opacity
+ hbox = GTK_BOX(gtk_hbox_new(false, 12));
+ gtk_box_pack_start(appearance_vbox, GTK_WIDGET(hbox), false, false, 0);
+
+ label = gtk_label_new_with_mnemonic(_("Background opacit_y:"));
+ gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+ gtk_box_pack_start(hbox, label, false, false, 0);
+ gtk_size_group_add_widget(label_size_group, label);
+
+ m_background_opacity = gtk_hscale_new_with_range(0.0, 100.0, 1.0);
+ gtk_box_pack_start(hbox, m_background_opacity, true, true, 0);
+ gtk_scale_set_value_pos(GTK_SCALE(m_background_opacity), GTK_POS_RIGHT);
+ gtk_range_set_value(GTK_RANGE(m_background_opacity), wm_settings->menu_opacity);
+ g_signal_connect_slot(m_background_opacity, "value-changed", &ConfigurationDialog::background_opacity_changed, this);
+
return page;
}
diff --git a/panel-plugin/configuration-dialog.h b/panel-plugin/configuration-dialog.h
index 56d3003..7772095 100644
--- a/panel-plugin/configuration-dialog.h
+++ b/panel-plugin/configuration-dialog.h
@@ -61,6 +61,8 @@ private:
void toggle_remember_favorites(GtkToggleButton* button);
void toggle_display_recent(GtkToggleButton* button);
+ void background_opacity_changed(GtkRange* range);
+
SearchAction* get_selected_action(GtkTreeIter* iter = NULL) const;
void action_selected(GtkTreeView* view);
void action_name_changed(GtkEditable* editable);
@@ -89,6 +91,7 @@ private:
GtkWidget* m_position_categories_alternate;
GtkWidget* m_category_icon_size;
GtkWidget* m_item_icon_size;
+ GtkWidget* m_background_opacity;
GtkWidget* m_button_style;
GtkWidget* m_title;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list