+set_logical_font (GtkWidget *button)
+{
+ HildonButtonPrivate *priv = HILDON_BUTTON_GET_PRIVATE (button);
+
+ /* In buttons with vertical arrangement, the 'value' label uses a
+ * different font */
+ if (GTK_IS_VBOX (priv->label_box)) {
+ GtkStyle *style = gtk_rc_get_style_by_paths (
+ gtk_settings_get_default (), "SmallSystemFont", NULL, G_TYPE_NONE);
+ if (style != NULL) {
+ PangoFontDescription *font_desc = style->font_desc;
+ if (font_desc != NULL) {
+ priv->setting_style = TRUE;
+ gtk_widget_modify_font (GTK_WIDGET (priv->value), font_desc);
+ priv->setting_style = FALSE;
+ }
+ }
+ }
+}
+
+static void
+set_logical_color (GtkWidget *button)
+{
+ GdkColor color;
+ const gchar *colorname;
+ HildonButtonPrivate *priv = HILDON_BUTTON_GET_PRIVATE (button);
+ GtkWidget *label = GTK_WIDGET (priv->value);
+
+ switch (priv->style) {
+ case HILDON_BUTTON_STYLE_NORMAL:
+ colorname = "SecondaryTextColor";
+ break;
+ case HILDON_BUTTON_STYLE_PICKER:
+ colorname = "ActiveTextColor";
+ break;
+ default:
+ g_return_if_reached ();
+ }
+
+ gtk_widget_ensure_style (label);
+ if (gtk_style_lookup_color (label->style, colorname, &color) == TRUE) {
+ priv->setting_style = TRUE;
+ gtk_widget_modify_fg (label, GTK_STATE_NORMAL, &color);
+ gtk_widget_modify_fg (label, GTK_STATE_PRELIGHT, &color);
+ priv->setting_style = FALSE;
+ }
+}
+
+static void