diff --git a/mythtv/libs/libmythui/mythuishape.cpp b/mythtv/libs/libmythui/mythuishape.cpp
index 6f9ccb4..39775b2 100644
a
|
b
|
MythUIShape::MythUIShape(MythUIType *parent, const QString &name) |
26 | 26 | m_linePen = QPen(Qt::NoPen); |
27 | 27 | m_cornerRadius = 10; |
28 | 28 | m_cropRect = MythRect(0, 0, 0, 0); |
| 29 | m_parsedLine = false; |
29 | 30 | } |
30 | 31 | |
31 | 32 | void MythUIShape::SetCropRect(int x, int y, int width, int height) |
… |
… |
bool MythUIShape::ParseElement( |
130 | 131 | } |
131 | 132 | else |
132 | 133 | m_linePen.setStyle(Qt::NoPen); |
| 134 | m_parsedLine = true; |
133 | 135 | } |
134 | 136 | else if (element.tagName() == "cornerradius") |
135 | 137 | { |
… |
… |
void MythUIShape::CopyFrom(MythUIType *base) |
161 | 163 | m_linePen = shape->m_linePen; |
162 | 164 | m_cornerRadius = shape->m_cornerRadius; |
163 | 165 | m_cropRect = shape->m_cropRect; |
| 166 | m_parsedLine = shape->m_parsedLine; |
164 | 167 | |
165 | 168 | MythUIType::CopyFrom(base); |
166 | 169 | } |
… |
… |
void MythUIShape::CreateCopy(MythUIType *parent) |
173 | 176 | MythUIShape *shape = new MythUIShape(parent, objectName()); |
174 | 177 | shape->CopyFrom(this); |
175 | 178 | } |
| 179 | |
| 180 | /** |
| 181 | * \copydoc MythUIType::Finalize() |
| 182 | */ |
| 183 | void MythUIShape::Finalize(void) |
| 184 | { |
| 185 | if (!m_parsedLine) |
| 186 | { |
| 187 | // If no <line> element was specified in the xml, explicitly set |
| 188 | // the line pen, otherwise Qt5 steals one pixel all the way |
| 189 | // around for an invisible border. |
| 190 | m_linePen.setColor(m_fillBrush.color()); |
| 191 | m_linePen.setWidth(0); |
| 192 | m_linePen.setStyle(Qt::SolidLine); |
| 193 | } |
| 194 | MythUIType::Finalize(); |
| 195 | } |
diff --git a/mythtv/libs/libmythui/mythuishape.h b/mythtv/libs/libmythui/mythuishape.h
index 15c363f..df75417 100644
a
|
b
|
class MUI_PUBLIC MythUIShape : public MythUIType |
36 | 36 | const QString &filename, QDomElement &element, bool showWarnings); |
37 | 37 | virtual void CopyFrom(MythUIType *base); |
38 | 38 | virtual void CreateCopy(MythUIType *parent); |
| 39 | virtual void Finalize(void); |
39 | 40 | |
40 | 41 | private: |
41 | 42 | QString m_type; |
… |
… |
class MUI_PUBLIC MythUIShape : public MythUIType |
43 | 44 | QPen m_linePen; |
44 | 45 | int m_cornerRadius; |
45 | 46 | MythRect m_cropRect; |
| 47 | bool m_parsedLine; |
46 | 48 | |
47 | 49 | friend class MythUIProgressBar; |
48 | 50 | friend class MythUIEditBar; |