Fix History dialog.
Cursor image missing.
This commit is contained in:
parent
4ec350693a
commit
1261708b06
|
@ -33,6 +33,7 @@
|
||||||
#include "../vgeometry/vellipticalarc.h"
|
#include "../vgeometry/vellipticalarc.h"
|
||||||
#include "../vgeometry/vpointf.h"
|
#include "../vgeometry/vpointf.h"
|
||||||
#include "../vgeometry/vsplinepath.h"
|
#include "../vgeometry/vsplinepath.h"
|
||||||
|
#include "../vmisc/theme/vtheme.h"
|
||||||
#include "../vmisc/vtablesearch.h"
|
#include "../vmisc/vtablesearch.h"
|
||||||
#include "../vmisc/vvalentinasettings.h"
|
#include "../vmisc/vvalentinasettings.h"
|
||||||
#include "../vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.h"
|
#include "../vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.h"
|
||||||
|
@ -141,7 +142,7 @@ void DialogHistory::cellClicked(int row, int column)
|
||||||
|
|
||||||
item = ui->tableWidget->item(row, 0);
|
item = ui->tableWidget->item(row, 0);
|
||||||
m_cursorRow = row;
|
m_cursorRow = row;
|
||||||
item->setIcon(QIcon("://icon/32x32/put_after.png"));
|
item->setIcon(QIcon(VTheme::GetPixmapResource(QStringLiteral("icon"), QStringLiteral("32x32/put_after.png"))));
|
||||||
const auto id = qvariant_cast<quint32>(item->data(Qt::UserRole));
|
const auto id = qvariant_cast<quint32>(item->data(Qt::UserRole));
|
||||||
m_doc->blockSignals(true);
|
m_doc->blockSignals(true);
|
||||||
row == ui->tableWidget->rowCount() - 1 ? m_doc->setCursor(0) : m_doc->setCursor(id);
|
row == ui->tableWidget->rowCount() - 1 ? m_doc->setCursor(0) : m_doc->setCursor(id);
|
||||||
|
@ -176,7 +177,8 @@ void DialogHistory::ChangedCursor(quint32 id)
|
||||||
QTableWidgetItem *oldCursorItem = ui->tableWidget->item(m_cursorRow, 0);
|
QTableWidgetItem *oldCursorItem = ui->tableWidget->item(m_cursorRow, 0);
|
||||||
oldCursorItem->setIcon(QIcon());
|
oldCursorItem->setIcon(QIcon());
|
||||||
m_cursorRow = i;
|
m_cursorRow = i;
|
||||||
item->setIcon(QIcon("://icon/32x32/put_after.png"));
|
item->setIcon(
|
||||||
|
QIcon(VTheme::GetPixmapResource(QStringLiteral("icon"), QStringLiteral("32x32/put_after.png"))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -234,11 +236,12 @@ void DialogHistory::FillTable()
|
||||||
ui->tableWidget->setRowCount(count); // Real row count
|
ui->tableWidget->setRowCount(count); // Real row count
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
|
ui->tableWidget->selectRow(0);
|
||||||
m_cursorRow = CursorRow();
|
m_cursorRow = CursorRow();
|
||||||
QTableWidgetItem *item = ui->tableWidget->item(m_cursorRow, 0);
|
QTableWidgetItem *item = ui->tableWidget->item(m_cursorRow, 0);
|
||||||
// cppcheck-suppress unknownMacro
|
// cppcheck-suppress unknownMacro
|
||||||
SCASSERT(item != nullptr)
|
SCASSERT(item != nullptr)
|
||||||
item->setIcon(QIcon("://icon/32x32/put_after.png"));
|
item->setIcon(QIcon(VTheme::GetPixmapResource(QStringLiteral("icon"), QStringLiteral("32x32/put_after.png"))));
|
||||||
}
|
}
|
||||||
ui->tableWidget->resizeColumnsToContents();
|
ui->tableWidget->resizeColumnsToContents();
|
||||||
ui->tableWidget->resizeRowsToContents();
|
ui->tableWidget->resizeRowsToContents();
|
||||||
|
|
|
@ -41,8 +41,7 @@
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="system-search">
|
<iconset theme="system-search"/>
|
||||||
<normaloff>.</normaloff>.</iconset>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>Alt+Down</string>
|
<string>Alt+Down</string>
|
||||||
|
@ -94,7 +93,6 @@
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>14</pointsize>
|
<pointsize>14</pointsize>
|
||||||
<weight>75</weight>
|
|
||||||
<italic>false</italic>
|
<italic>false</italic>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
|
@ -127,7 +125,6 @@
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>14</pointsize>
|
<pointsize>14</pointsize>
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
|
@ -162,7 +159,6 @@
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>14</pointsize>
|
<pointsize>14</pointsize>
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
|
@ -194,7 +190,6 @@
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>14</pointsize>
|
<pointsize>14</pointsize>
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
|
@ -228,11 +223,10 @@
|
||||||
<string><html><head/><body><p>Find Previous <span style=" color:#888a85;">%1</span></p></body></html></string>
|
<string><html><head/><body><p>Find Previous <span style=" color:#888a85;">%1</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true"></string>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="go-up">
|
<iconset theme="go-up"/>
|
||||||
<normaloff>.</normaloff>.</iconset>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>Shift+F3</string>
|
<string>Shift+F3</string>
|
||||||
|
@ -248,11 +242,10 @@
|
||||||
<string><html><head/><body><p>Find Next %1</p></body></html></string>
|
<string><html><head/><body><p>Find Next %1</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true"></string>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="go-down">
|
<iconset theme="go-down"/>
|
||||||
<normaloff>.</normaloff>.</iconset>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>F3</string>
|
<string>F3</string>
|
||||||
|
@ -269,6 +262,9 @@
|
||||||
<property name="alternatingRowColors">
|
<property name="alternatingRowColors">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="selectionBehavior">
|
||||||
|
<enum>QAbstractItemView::SelectRows</enum>
|
||||||
|
</property>
|
||||||
<attribute name="horizontalHeaderVisible">
|
<attribute name="horizontalHeaderVisible">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
|
@ -527,7 +527,7 @@ auto VTheme::GetIconResource(const QString &root, const QString &iconName) -> QI
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto VTheme::GetPixmapResource(const QString &root, const QString &iconName) -> QPixmap
|
auto VTheme::GetPixmapResource(const QString &root, const QString &iconName) -> QPixmap
|
||||||
{
|
{
|
||||||
bool dark = (ColorSheme() == VColorSheme::Dark);
|
bool const dark = (ColorSheme() == VColorSheme::Dark);
|
||||||
return ::GetPixmapResource(root, iconName, dark);
|
return ::GetPixmapResource(root, iconName, dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user