summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2013-10-21 11:39:03 +0300
committerEric Koegel <eric.koegel@gmail.com>2013-10-21 11:40:42 +0300
commit751d6e29c1ad3e02d7fdaaf873ff3c3285cc568a (patch)
tree644f540726ce031800b0c5f5e55a55b30ca4f93e
parent7b305eb5092ce88c32e019d6479903d630b9ae86 (diff)
downloadxfdesktop-751d6e29c1ad3e02d7fdaaf873ff3c3285cc568a.tar.gz
Allow the font size to go to 0.
Allow the user to set the font size to 0, at which point no icon label will be drawn.
-rw-r--r--settings/xfdesktop-settings-ui.glade2
-rw-r--r--src/xfce-desktop.c7
-rw-r--r--src/xfdesktop-icon-view.c5
3 files changed, 8 insertions, 6 deletions
diff --git a/settings/xfdesktop-settings-ui.glade b/settings/xfdesktop-settings-ui.glade
index 1e721791..ff04b372 100644
--- a/settings/xfdesktop-settings-ui.glade
+++ b/settings/xfdesktop-settings-ui.glade
@@ -11,7 +11,7 @@
</object>
<object class="GtkAdjustment" id="adjustment4">
<property name="upper">144</property>
- <property name="lower">4</property>
+ <property name="lower">0</property>
<property name="page_increment">10</property>
<property name="step_increment">1</property>
<property name="page_size">0</property>
diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c
index b5b718dc..e7d5b454 100644
--- a/src/xfce-desktop.c
+++ b/src/xfce-desktop.c
@@ -245,9 +245,10 @@ xfce_desktop_setup_icon_view(XfceDesktop *desktop)
xfce_desktop_ensure_system_font_size(desktop);
desktop->priv->icon_view = xfdesktop_icon_view_new(manager);
+ /* If the user set a custom font size, use it. Otherwise use the system
+ * font size */
xfdesktop_icon_view_set_font_size(XFDESKTOP_ICON_VIEW(desktop->priv->icon_view),
- (!desktop->priv->icons_font_size_set
- || !desktop->priv->icons_font_size)
+ (!desktop->priv->icons_font_size_set)
? desktop->priv->system_font_size
: desktop->priv->icons_font_size);
if(desktop->priv->icons_size > 0) {
@@ -818,7 +819,7 @@ xfce_desktop_class_init(XfceDesktopClass *klass)
g_param_spec_uint("icon-font-size",
"icon font size",
"icon font size",
- 4, 144, 12,
+ 0, 144, 12,
XFDESKTOP_PARAM_FLAGS));
g_object_class_install_property(gobject_class, PROP_ICON_FONT_SIZE_SET,
diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index dd4a7e40..987c9a70 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -1166,7 +1166,6 @@ xfdesktop_icon_view_show_tooltip(GtkWidget *widget,
return FALSE;
tooltip_size = xfdesktop_icon_view_get_tooltip_size(icon_view);
- DBG("tooltip size %d", tooltip_size);
tip_text = xfdesktop_icon_peek_tooltip(icon_view->priv->item_under_pointer);
if(!tip_text)
@@ -3116,7 +3115,9 @@ xfdesktop_icon_view_paint_icon(XfdesktopIconView *icon_view,
}
/* Only redraw the text if the text area requires it. */
- if(gdk_rectangle_intersect(area, &text_extents, &intersection)) {
+ if(gdk_rectangle_intersect(area, &text_extents, &intersection)
+ && icon_view->priv->font_size > 0)
+ {
xfdesktop_paint_rounded_box(icon_view, state, &text_extents, area);
if (state == GTK_STATE_NORMAL) {