mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 05:00:06 -05:00
--Code Change
-Change Sequence Preview to PREVIEW_SIZE (128)
This commit is contained in:
parent
ee7ca7065e
commit
0fc2d3107e
@ -47,7 +47,7 @@ public:
|
||||
/// <param name="height">The height of the image in pixels</param>
|
||||
void SetImage(vector<byte>& v, uint width, uint height)
|
||||
{
|
||||
constexpr auto size = 64;
|
||||
constexpr auto size = PREVIEW_SIZE;
|
||||
m_Image = QImage(width, height, QImage::Format_RGBA8888);
|
||||
memcpy(m_Image.scanLine(0), v.data(), SizeOf(v));//Memcpy the data in.
|
||||
m_Pixmap = QPixmap::fromImage(m_Image).scaled(QSize(size, size), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);//Create a QPixmap out of the QImage, scaled to size.
|
||||
|
@ -32,7 +32,7 @@ class Fractorium;
|
||||
template <typename T> class PreviewRenderer;
|
||||
template <typename T> class TreePreviewRenderer;
|
||||
|
||||
#define PREVIEW_SIZE 256
|
||||
#define PREVIEW_SIZE 128
|
||||
#define UNDO_SIZE 512
|
||||
|
||||
/// <summary>
|
||||
|
@ -176,18 +176,18 @@ void FractoriumEmberController<T>::SyncLibrary(eLibraryUpdate update)
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::FillLibraryTree(int selectIndex)
|
||||
{
|
||||
uint size = 64;
|
||||
uint i = 0;
|
||||
const auto tree = m_Fractorium->ui.LibraryTree;
|
||||
const uint size = PREVIEW_SIZE;
|
||||
vector<byte> v(size * size * 4);
|
||||
StopAllPreviewRenderers();
|
||||
const auto tree = m_Fractorium->ui.LibraryTree;
|
||||
tree->clear();
|
||||
StopAllPreviewRenderers();
|
||||
auto fileItem = new QTreeWidgetItem(tree);
|
||||
QFileInfo info(m_EmberFile.m_Filename);
|
||||
fileItem->setText(0, info.fileName());
|
||||
fileItem->setToolTip(0, m_EmberFile.m_Filename);
|
||||
fileItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable | Qt::ItemIsDropEnabled);
|
||||
|
||||
uint i = 0;
|
||||
for (auto& it : m_EmberFile.m_Embers)
|
||||
{
|
||||
auto emberItem = new EmberTreeWidgetItem<T>(&it, fileItem);
|
||||
@ -216,7 +216,7 @@ void FractoriumEmberController<T>::FillLibraryTree(int selectIndex)
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::UpdateLibraryTree()
|
||||
{
|
||||
const uint size = 64;
|
||||
const uint size = PREVIEW_SIZE;
|
||||
vector<byte> v(size * size * 4);
|
||||
const auto tree = m_Fractorium->ui.LibraryTree;
|
||||
|
||||
@ -479,18 +479,18 @@ void FractoriumEmberController<T>::StopAllPreviewRenderers()
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::FillSequenceTree()
|
||||
{
|
||||
const uint size = 64;
|
||||
uint i = 0;
|
||||
const auto tree = m_Fractorium->ui.SequenceTree;
|
||||
const uint size = PREVIEW_SIZE;
|
||||
vector<byte> v(size * size * 4);
|
||||
m_SequencePreviewRenderer->Stop();
|
||||
const auto tree = m_Fractorium->ui.SequenceTree;
|
||||
tree->clear();
|
||||
StopAllPreviewRenderers();
|
||||
auto fileItem = new QTreeWidgetItem(tree);
|
||||
QFileInfo info(m_SequenceFile.m_Filename);
|
||||
fileItem->setText(0, info.fileName());
|
||||
fileItem->setToolTip(0, m_SequenceFile.m_Filename);
|
||||
fileItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable);
|
||||
|
||||
uint i = 0;
|
||||
for (auto& it : m_SequenceFile.m_Embers)
|
||||
{
|
||||
auto emberItem = new EmberTreeWidgetItemBase(fileItem);
|
||||
|
Loading…
Reference in New Issue
Block a user