Merge
--HG-- branch : develop
This commit is contained in:
commit
e31a6eb841
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
|
@ -5,13 +5,18 @@ Inherits=gnome,hicolor
|
|||
Example=x-directory-normal
|
||||
|
||||
#Directories
|
||||
Directories=16x16/actions,24x24/actions,32x32/actions,32x32/emblems
|
||||
Directories=16x16/actions,16x16/status,24x24/actions,32x32/actions,32x32/emblems
|
||||
|
||||
[16x16/actions]
|
||||
Size=16
|
||||
Context=Actions
|
||||
Type=Fixed
|
||||
|
||||
[16x16/status]
|
||||
Size=16
|
||||
Context=Status
|
||||
Type=Fixed
|
||||
|
||||
[24x24/actions]
|
||||
Size=24
|
||||
Context=Actions
|
||||
|
|
|
@ -80,5 +80,6 @@
|
|||
<file alias="16x16/actions/go-previous.png">icons/win.icon.theme/16x16/actions/go-previous.png</file>
|
||||
<file alias="24x24/actions/go-previous.png">icons/win.icon.theme/24x24/actions/go-previous.png</file>
|
||||
<file alias="32x32/actions/go-previous.png">icons/win.icon.theme/32x32/actions/go-previous.png</file>
|
||||
<file alias="16x16/status/dialog-warning.png">icons/win.icon.theme/16x16/status/dialog-warning.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -455,14 +455,27 @@ void DialogDetail::ScrollDown()
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
bool DialogDetail::DetailIsValid() const
|
||||
{
|
||||
const QIcon icon = QIcon::fromTheme("dialog-warning",
|
||||
QIcon(":/icons/win.icon.theme/16x16/status/dialog-warning.png"));
|
||||
|
||||
const QPixmap pixmap = icon.pixmap(QSize(16, 16));
|
||||
QByteArray byteArray;
|
||||
QBuffer buffer(&byteArray);
|
||||
pixmap.save(&buffer, "PNG");
|
||||
QString url = QString("<img src=\"data:image/png;base64,") + byteArray.toBase64() + "\"/>";
|
||||
|
||||
if (ui.listWidget->count() < 3)
|
||||
{
|
||||
url += QString(" ") + tr("You need more points!");
|
||||
ui.helpLabel->setText(url);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (FirstPointEqualLast())
|
||||
{
|
||||
url += QString(" ") +tr("First point can not equal the last point!");
|
||||
ui.helpLabel->setText(url);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
@ -474,11 +487,14 @@ bool DialogDetail::DetailIsValid() const
|
|||
|
||||
if (QString::compare(previousRow, nextRow) == 0)
|
||||
{
|
||||
url += QString(" ") +tr("You have double points!");
|
||||
ui.helpLabel->setText(url);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ui.helpLabel->setText(tr("Ready!"));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -390,6 +390,19 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="helpLabel">
|
||||
<property name="text">
|
||||
<string>Ready!</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
|
|
Loading…
Reference in New Issue
Block a user