Rename underscore to underline
This commit is contained in:
parent
85310163dd
commit
776e089399
|
@ -29,7 +29,7 @@ void QtMaterialTextFieldPrivate::init()
|
||||||
label = 0;
|
label = 0;
|
||||||
labelFontSize = 9.5;
|
labelFontSize = 9.5;
|
||||||
showLabel = false;
|
showLabel = false;
|
||||||
showUnderscore = true;
|
showUnderline = true;
|
||||||
useThemeColors = true;
|
useThemeColors = true;
|
||||||
|
|
||||||
q->setFrame(false);
|
q->setFrame(false);
|
||||||
|
@ -232,19 +232,24 @@ QColor QtMaterialTextField::underlineColor() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtMaterialTextField::setShowUnderscore(bool value)
|
void QtMaterialTextField::setShowUnderline(bool value)
|
||||||
{
|
{
|
||||||
Q_D(QtMaterialTextField);
|
Q_D(QtMaterialTextField);
|
||||||
|
|
||||||
if (d->showUnderscore == value) {
|
if (d->showUnderline == value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
d->showUnderscore = value;
|
d->showUnderline = value;
|
||||||
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QtMaterialTextField::hasUnderline() const
|
||||||
|
{
|
||||||
|
Q_D(const QtMaterialTextField);
|
||||||
|
|
||||||
|
return d->showUnderline;
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \reimp
|
* \reimp
|
||||||
|
@ -289,8 +294,7 @@ void QtMaterialTextField::paintEvent(QPaintEvent *event)
|
||||||
const int y = height()-1;
|
const int y = height()-1;
|
||||||
const int wd = width()-5;
|
const int wd = width()-5;
|
||||||
|
|
||||||
|
if (d->showUnderline)
|
||||||
if( d->showUnderscore )
|
|
||||||
{
|
{
|
||||||
QPen pen;
|
QPen pen;
|
||||||
pen.setWidth(1);
|
pen.setWidth(1);
|
||||||
|
|
|
@ -41,7 +41,9 @@ public:
|
||||||
|
|
||||||
void setUnderlineColor(const QColor &color);
|
void setUnderlineColor(const QColor &color);
|
||||||
QColor underlineColor() const;
|
QColor underlineColor() const;
|
||||||
void setShowUnderscore(bool value);
|
|
||||||
|
void setShowUnderline(bool value);
|
||||||
|
bool hasUnderline() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool event(QEvent *event) Q_DECL_OVERRIDE;
|
bool event(QEvent *event) Q_DECL_OVERRIDE;
|
||||||
|
|
|
@ -29,7 +29,7 @@ public:
|
||||||
QString labelString;
|
QString labelString;
|
||||||
qreal labelFontSize;
|
qreal labelFontSize;
|
||||||
bool showLabel;
|
bool showLabel;
|
||||||
bool showUnderscore;
|
bool showUnderline;
|
||||||
bool useThemeColors;
|
bool useThemeColors;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue