Commit 370d294a authored by Vlad Rakhmanin's avatar Vlad Rakhmanin
Browse files

Added fontSize slider.

Added a fontSize slider to the front page that successfully moves the fontSize value of the Kontrast object.
parent cc4b50f0
......@@ -232,6 +232,22 @@ Kirigami.ScrollablePage {
}
}
Flow {
Text {
Layout.topMargin: Kirigami.Units.largeSpacing
text: i18n("Font Size %1", Kontrast.fontSize)
color: Kontrast.displayTextColor
}
Layout.topMargin: Kirigami.Units.gridUnit * 2
QQC2.Slider {
from: 1
value: Kontrast.fontSize
to: 72
onMoved: Kontrast.fontSize = value
}
}
Flow {
Layout.fillWidth: true
Layout.topMargin: Kirigami.Units.gridUnit * 2
......
......@@ -216,6 +216,7 @@ qreal Kontrast::contrast() const
void Kontrast::random()
{
m_fontSize = 12;
do {
m_textColor = QColor::fromRgb(QRandomGenerator::global()->generate());
m_backgroundColor = QColor::fromRgb(QRandomGenerator::global()->generate());
......
......@@ -108,7 +108,7 @@ private:
QColor m_textColor;
QColor m_backgroundColor;
QColor m_grabbedColor;
int m_fontSize = 24;
int m_fontSize;
KAboutData m_about;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment