+2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * Style.cs:
+ * Label.cs:
+ * TreeView.cs: Patch by Marek Habersack that fixes bug #78968 take 2.
+
2006-08-03 Vladimir Krasnov <vladimirk@mainsoft.com>
* Style.cs: fixed restoring FontInfo from ViewState
}
#endregion // Protected Instance Properties
+ #region Internal Instance Properties
+ internal bool AlwaysRenderTextDecoration
+ {
+ get
+ {
+ if (viewstate["AlwaysRenderTextDecoration"] == null)
+ return false;
+ return (bool)viewstate["AlwaysRenderTextDecoration"];
+ }
+
+ set
+ {
+ viewstate["AlwaysRenderTextDecoration"] = value;
+ }
+ }
+ #endregion // Internal Instance Properties
+
#region Public Instance Methods
public void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer)
{
if (fontinfo.Underline)
s += "underline ";
- s = (s != "") ? s : "none";
- writer.AddStyleAttribute (HtmlTextWriterStyle.TextDecoration, s);
+ s = (s != "") ? s : AlwaysRenderTextDecoration ? "none" : "";
+ if (s != "")
+ writer.AddStyleAttribute (HtmlTextWriterStyle.TextDecoration, s);
}
}
s += "underline ";
}
- s = (s != "") ? s : "none";
- attributes.Add (HtmlTextWriterStyle.TextDecoration, s);
+ s = (s != "") ? s : AlwaysRenderTextDecoration ? "none" : "";
+ if (s != "")
+ attributes.Add (HtmlTextWriterStyle.TextDecoration, s);
}
}