switch to svg icon for list layout

This commit is contained in:
csoler 2020-08-28 22:39:48 +02:00
parent bfee7a0266
commit f17fae4519
3 changed files with 7 additions and 2 deletions

View File

@ -290,8 +290,9 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
ui->setupUi(this); ui->setupUi(this);
ui->list_TB->setIcon(FilesDefs::getIconFromQtResourcePath(":Posted/images/classic.png")); ui->list_TB->setIcon(FilesDefs::getIconFromQtResourcePath(":icons/svg/listlayout.svg"));
ui->grid_TB->setIcon(FilesDefs::getIconFromQtResourcePath(":icons/svg/gridlayout.svg")); ui->grid_TB->setIcon(FilesDefs::getIconFromQtResourcePath(":icons/svg/gridlayout.svg"));
whileBlocking(ui->grid_TB)->setChecked(true);
connect(ui->list_TB,SIGNAL(clicked()),this,SLOT(switchView())); connect(ui->list_TB,SIGNAL(clicked()),this,SLOT(switchView()));
connect(ui->grid_TB,SIGNAL(clicked()),this,SLOT(switchView())); connect(ui->grid_TB,SIGNAL(clicked()),this,SLOT(switchView()));
@ -433,12 +434,14 @@ void GxsChannelPostsWidgetWithModel::postContextMenu(const QPoint&)
{ {
QMenu menu(this); QMenu menu(this);
#ifdef TO_REMOVE
if(mChannelPostsModel->getMode() == RsGxsChannelPostsModel::TREE_MODE_GRID) if(mChannelPostsModel->getMode() == RsGxsChannelPostsModel::TREE_MODE_GRID)
menu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_GRID_VIEW), tr("Switch to list view"), this, SLOT(switchView())); menu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_GRID_VIEW), tr("Switch to list view"), this, SLOT(switchView()));
else else
menu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_GRID_VIEW), tr("Switch to grid view"), this, SLOT(switchView())); menu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_GRID_VIEW), tr("Switch to grid view"), this, SLOT(switchView()));
menu.addSeparator(); menu.addSeparator();
#endif
QModelIndex index = ui->postsTree->selectionModel()->currentIndex(); QModelIndex index = ui->postsTree->selectionModel()->currentIndex();

View File

@ -4,7 +4,7 @@
<file>icons/svg/hidden.svg</file> <file>icons/svg/hidden.svg</file>
<file>icons/svg/randomness.svg</file> <file>icons/svg/randomness.svg</file>
<file>icons/svg/password.svg</file> <file>icons/svg/password.svg</file>
<file>Posted/images/classic.png</file> <file>icons/svg/listlayout.svg</file>
<file>icons/svg/gridlayout.svg</file> <file>icons/svg/gridlayout.svg</file>
<file>icons/stars/star0.png</file> <file>icons/stars/star0.png</file>
<file>icons/stars/star1.png</file> <file>icons/stars/star1.png</file>

View File

@ -0,0 +1,2 @@
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" enable-background="new 0 0 512 512" height="512px" viewBox="0 0 512 512" width="512px" class=""><g transform="matrix(0.94148 0 0 0.94148 14.9811 14.9811)"><path d="m464.883 64.267h-417.766c-25.98 0-47.117 21.136-47.117 47.149 0 25.98 21.137 47.117 47.117 47.117h417.766c25.98 0 47.117-21.137 47.117-47.117 0-26.013-21.137-47.149-47.117-47.149z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#039BD5"/><path d="m464.883 208.867h-417.766c-25.98 0-47.117 21.136-47.117 47.149 0 25.98 21.137 47.117 47.117 47.117h417.766c25.98 0 47.117-21.137 47.117-47.117 0-26.013-21.137-47.149-47.117-47.149z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#039BD5"/><path d="m464.883 353.467h-417.766c-25.98 0-47.117 21.137-47.117 47.149 0 25.98 21.137 47.117 47.117 47.117h417.766c25.98 0 47.117-21.137 47.117-47.117 0-26.012-21.137-47.149-47.117-47.149z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#039BD5"/></g> </svg>

After

Width:  |  Height:  |  Size: 1.0 KiB