Commit ab9bf1b1 authored by Denis Kuplyakov's avatar Denis Kuplyakov
Browse files

Cleaned up QML Popup code a bit.

parent 74ed21c5
......@@ -44,11 +44,6 @@ ExtManager::ExtManager()
qCopy(RANGE, RANGE + 6, s.begin());
setScoreHistogram(s, ScoreBound);
// FIXME dimsuz: somehow rearrange the code to be sure that this and in mainwindow.cpp are
// always in sync
// m_typeLabels << i18n("Very Easy") << i18n("Easy") << i18n("Normal");
// m_typeLabels << i18n("Hard") << i18n("Very Hard") << i18n("Unbeatable") << i18n("Champion");
QList< const KgDifficultyLevel * > diffList = Kg::difficulty()->levels();
for (int i = 0; i < diffList.size(); i++)
......
......@@ -32,12 +32,10 @@ Rectangle {
property string iconName: "dialog-information"
property alias showIcon: icon.visible
property alias hideOnMouseClick: mouseArea.enabled
property bool useCustomTextColor: false
property color textColor: "white"
property bool useCustomBackgroundColor: false
property color backgroundColor: "black"
property alias textColor: text.color
property alias backgroundColor: popup.color
property bool useCustomBorderColor: false
property color borderColor: "black"
property color borderColor: popup.border.color
property int borderWidth: 1
property bool isReplacing: false
......@@ -49,7 +47,7 @@ Rectangle {
height: row.height + 2 * marginOnSides
width: row.width + 2 * marginOnSides
color: useCustomBackgroundColor ? backgroundColor : colorScheme.background
color: colorScheme.background
border.color: useCustomBorderColor ? borderColor : colorScheme.border
border.width: borderWidth
......@@ -77,15 +75,14 @@ Rectangle {
Row {
id: row
x: marginOnSides
y: marginOnSides
anchors.centerIn: parent
spacing: marginIconText
Image {
id: icon
anchors.verticalCenter: parent.verticalCenter
width: visible ? 32 : 0
height: visible ? 32 : 0
height: width
source: "image://icon/" + iconName
}
......
Markdown is supported
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