Avoid 1px gaps between consecutive underlined words in wxHTML
At least when using standard fonts under MSW, the underlines under the consecutive words didn't overlap, resulting in ugly gaps between them when using more than one word as the link text, for example. Work around this by drawing an extra, slightly offset, underlined space when the previous cell was drawn underlined.
This commit is contained in:
@@ -125,7 +125,12 @@ public:
|
||||
class WXDLLIMPEXP_HTML wxHtmlRenderingInfo
|
||||
{
|
||||
public:
|
||||
wxHtmlRenderingInfo() : m_selection(NULL), m_style(NULL) {}
|
||||
wxHtmlRenderingInfo()
|
||||
: m_selection(NULL),
|
||||
m_style(NULL),
|
||||
m_prevUnderlined(false)
|
||||
{
|
||||
}
|
||||
|
||||
void SetSelection(wxHtmlSelection *s) { m_selection = s; }
|
||||
wxHtmlSelection *GetSelection() const { return m_selection; }
|
||||
@@ -133,12 +138,16 @@ public:
|
||||
void SetStyle(wxHtmlRenderingStyle *style) { m_style = style; }
|
||||
wxHtmlRenderingStyle& GetStyle() { return *m_style; }
|
||||
|
||||
void SetCurrentUnderlined(bool u) { m_prevUnderlined = u; }
|
||||
bool WasPreviousUnderlined() const { return m_prevUnderlined; }
|
||||
|
||||
wxHtmlRenderingState& GetState() { return m_state; }
|
||||
|
||||
protected:
|
||||
wxHtmlSelection *m_selection;
|
||||
wxHtmlRenderingStyle *m_style;
|
||||
wxHtmlRenderingState m_state;
|
||||
bool m_prevUnderlined;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user