added switch between grid and list views in channels.

This commit is contained in:
csoler 2020-08-27 17:14:55 +02:00
parent 4472f1cef4
commit 38f1df2b36
4 changed files with 61 additions and 22 deletions

View file

@ -68,13 +68,16 @@ class ChannelPostDelegate: public QAbstractItemDelegate
int cellSize(const QFont& font) const;
void zoom(bool zoom_or_unzoom) ;
private:
void setWidgetGrid(bool use_grid) ;
private:
static constexpr float IMAGE_MARGIN_FACTOR = 1.0;
static constexpr float IMAGE_SIZE_FACTOR_W = 4.0 ;
static constexpr float IMAGE_SIZE_FACTOR_H = 6.0 ;
static constexpr float IMAGE_ZOOM_FACTOR = 1.0;
float mZoom; // zoom factor for the whole thumbnail
bool mUseGrid; // wether we use the grid widget or the list widget
};
class GxsChannelPostsWidgetWithModel: public GxsMessageFrameWidget
@ -147,6 +150,7 @@ private slots:
void postContextMenu(const QPoint&);
void copyMessageLink();
void updateZoomFactor(bool zoom_or_unzoom);
void switchView();
public slots:
void sortColumnFiles(int col,Qt::SortOrder so);