Verified Commit b9f71a77 authored by Andre Miranda's avatar Andre Miranda
Browse files

Fix Text field size setting (#4)

Also set 10 as the minimal size

Closes #4
parent 01ee8705
Pipeline #12032 passed with stages
in 1 minute and 20 seconds
......@@ -414,9 +414,8 @@ GtkWidget *dict_prefs_dialog_show(GtkWidget *parent, DictData *dd)
/* panel entry size */
panel_entry_size_label = gtk_label_new_with_mnemonic(_("Text field size:"));
gtk_widget_show(panel_entry_size_label);
panel_entry_size_spinner = gtk_spin_button_new_with_range(0.0, 500.0, 1.0);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(panel_entry_size_spinner),
dd->panel_entry_size);
panel_entry_size_spinner = gtk_spin_button_new_with_range(10.0, 500.0, 1.0);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(panel_entry_size_spinner), dd->panel_entry_size);
g_object_set_data(G_OBJECT(dialog), "check_panel_entry", check_panel_entry);
g_object_set_data(G_OBJECT(dialog), "panel_entry_size_spinner", panel_entry_size_spinner);
......
......@@ -85,7 +85,7 @@ static gboolean dict_plugin_panel_set_size(XfcePanelPlugin *plugin, gint wsize,
{
xfce_panel_plugin_set_small(plugin, FALSE);
if (xfce_panel_plugin_get_mode(dpd->plugin) == XFCE_PANEL_PLUGIN_MODE_HORIZONTAL)
gtk_widget_set_size_request(dpd->dd->panel_entry, dpd->dd->panel_entry_size, -1);
gtk_entry_set_width_chars(GTK_ENTRY(dpd->dd->panel_entry), dpd->dd->panel_entry_size);
else
gtk_widget_set_size_request(dpd->dd->panel_entry, -1, -1);
gtk_orientable_set_orientation(GTK_ORIENTABLE(dpd->box), xfce_panel_plugin_get_orientation(dpd->plugin));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment