[Xfce4-commits] <xfdesktop:eric/settings-changes> Allow the font size to go to 0.
Eric Koegel
noreply at xfce.org
Mon Oct 21 10:42:01 CEST 2013
Updating branch refs/heads/eric/settings-changes
to 751d6e29c1ad3e02d7fdaaf873ff3c3285cc568a (commit)
from 7b305eb5092ce88c32e019d6479903d630b9ae86 (commit)
commit 751d6e29c1ad3e02d7fdaaf873ff3c3285cc568a
Author: Eric Koegel <eric.koegel at gmail.com>
Date: Mon Oct 21 11:39:03 2013 +0300
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.
settings/xfdesktop-settings-ui.glade | 2 +-
src/xfce-desktop.c | 7 ++++---
src/xfdesktop-icon-view.c | 5 +++--
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/settings/xfdesktop-settings-ui.glade b/settings/xfdesktop-settings-ui.glade
index 1e72179..ff04b37 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 b5b718d..e7d5b45 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 dd4a7e4..987c9a7 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) {
More information about the Xfce4-commits
mailing list