Index: scribus/ui/pagepalette_widgets.cpp
===================================================================
--- scribus/ui/pagepalette_widgets.cpp	(Revision 26292)
+++ scribus/ui/pagepalette_widgets.cpp	(Arbeitskopie)
@@ -11,6 +11,7 @@
 #include <QDrag>
 #include <QElapsedTimer>
 #include <QEvent>
+#include <QFontMetrics>
 #include <QHeaderView>
 #include <QLabel>
 #include <QList>
@@ -673,7 +674,7 @@
 	update();
 }
 
-void PageGrid::drawTile(QPainter &painter, QPoint cellPosition, PageCell *tile, bool selected, bool hovered, QColor labelColor)
+void PageGrid::drawTile(QPainter &painter, QPoint cellPosition, PageCell *tile, bool selected, bool hovered, QColor labelColor, bool isRight)
 {
 
 	if (tile == nullptr)
@@ -680,10 +681,25 @@
 		return;
 
 	QFont font(this->font().family(), m_fontSize, QFont::Normal);
+	QFont fontName(this->font().family(), m_fontSize * 0.8, QFont::Normal);
+	QFontMetrics fm(font);
 	QRect rectPage(cellPosition.x(), cellPosition.y(), tile->pageWidthByHeight(pageHeight()), pageHeight());
 	QRect rectCell(cellPosition.x(), cellPosition.y(), tile->pageWidthByHeight(pageHeight()), m_rowHeight);
 	//	QRect rectMasterPageMarker(cellPosition.x(), cellPosition.y() + rectPage.height(), rectPage.width(), 4);
 
+	QString pageName = tile->pageName;
+	int pageNameHyphen = tile->pageName.indexOf("-");
+	// Fail fast if no hyphen or nothing to the left of it
+	if (pageNameHyphen > 0)
+	{
+		// Trim whitespace and ensure at least 1-4 chars or ignore it
+		QString tmp = tile->pageName.left(pageNameHyphen).trimmed();
+		if (tmp.length() > 0 && tmp.length() < 5)
+			pageName = tmp;
+	}
+
+//	pageName = fm.elidedText(pageName, Qt::TextElideMode::ElideRight, rectPage.adjusted(1, 1, 0, 0).width());
+
 	painter.save();
 
 	// Draw Page
@@ -703,9 +719,10 @@
 
 	// Draw Page Name
 	painter.setBackgroundMode(Qt::OpaqueMode);
-	painter.setBackground(QColor(0,0,0,128));
+	painter.setBackground(QColor(102, 102, 102));
+	painter.setFont((pageNameHyphen > 0) ? font : fontName);
 	painter.setPen(QPen(Qt::white));
-	painter.drawText(rectPage.adjusted(2,2,-2,-2), Qt::AlignTop | Qt::AlignLeft |Qt::TextWordWrap, tile->pageName);
+	painter.drawText(rectPage.adjusted(1, 1, 0, 0), Qt::AlignTop | ((isRight) ? Qt::AlignRight : Qt::AlignLeft) |Qt::TextWordWrap, pageName);
 
 	// Draw Master Page Color
 	//	painter.setPen(Qt::NoPen);
@@ -820,7 +837,8 @@
 				if (id == m_selectedPage)
 					selectedPageRect = QRect(x, y, cell->pageWidthByHeight(pageHeight()), pageHeight() );
 				QPoint pos(x,y);
-				drawTile(painter, pos, cell, (id == m_selectedPage) ? true : false, (id == m_hoveredPage) ? true : false, foregroundColor);
+				bool isRightPage = (m_cellsInGroup == c + 1 && m_cellsInGroup > 1);
+				drawTile(painter, pos, cell, (id == m_selectedPage) ? true : false, (id == m_hoveredPage) ? true : false, foregroundColor, isRightPage);
 
 				// add space only between pages
 				if ((c + 1) % m_cellsInGroup == 0 || count == pageCount() + m_pageOffset -1)
Index: scribus/ui/pagepalette_widgets.h
===================================================================
--- scribus/ui/pagepalette_widgets.h	(Revision 26292)
+++ scribus/ui/pagepalette_widgets.h	(Arbeitskopie)
@@ -78,186 +78,186 @@
 
 };
 
-struct SCRIBUS_API PageCell
+struct SCRIBUS_API PageCell
 {
-	QString pageName;
-	uint pageNumber;
-	QPixmap pagePreview;
-	QColor masterPageColor;
-	double pageRatio;
-
-	PageCell(const QString& text, uint nr, const QPixmap& pix, double pageRatio, const QColor color = Qt::black) :
-		pageName(text), pageNumber(nr), pagePreview(pix), masterPageColor(color), pageRatio(pageRatio) {}
-
-	int pageWidthByHeight(int height) { return qCeil(height * pageRatio); }
-
-};
-
-/* ********************************************************************************* *
- *
- * Page Grid
- *
- * ********************************************************************************* */
-
-class SCRIBUS_API PageGrid : public QWidget
-{
+	QString pageName;
+	uint pageNumber;
+	QPixmap pagePreview;
+	QColor masterPageColor;
+	double pageRatio;
+
+	PageCell(const QString& text, uint nr, const QPixmap& pix, double pageRatio, const QColor color = Qt::black) :
+		pageName(text), pageNumber(nr), pagePreview(pix), masterPageColor(color), pageRatio(pageRatio) {}
+
+	int pageWidthByHeight(int height) { return qCeil(height * pageRatio); }
+
+};
+
+/* ********************************************************************************* *
+ *
+ * Page Grid
+ *
+ * ********************************************************************************* */
+
+class SCRIBUS_API PageGrid : public QWidget
+{
 	Q_OBJECT
 
-	friend class PageViewer;
-
+	friend class PageViewer;
+
 public:
-	explicit PageGrid(QWidget *parent = nullptr);
+	explicit PageGrid(QWidget *parent = nullptr);
 
-	void setPageInGroup(int amount);
+	void setPageInGroup(int amount);
 
-	void setDocumentPageSize(QSizeF pageSize);
-
-	void setRowHeight(int size);
-	int rowHeight() { return m_rowHeight; };
-
-	void setFontSize(int size);
-	int fontSize() { return m_fontSize; };
-
-	void setSelectionColor(QColor color);
-	QColor selectionColor() { return m_colorSelection; };
-
-	void setPageLayout(PageLayout layout);
-	PageLayout pageLayout() { return m_pageLayout; };
-
-	void setPageOffset(int pageCount);
-	int pageOffset() { return m_pageOffset; };
-
-	QList<PageCell*> pageList;
-
-	int pageId(int r, int c, bool clampId = true);
-	int pageId(QPoint pos, bool clampId = true);
-
-	PageCell* getPageItem(int pageIndex);
-
-	int pageCount();
-	int pageHeight();
-
-	void setSelectedPage(int pageID);
-	int selectedPage() { return m_selectedPage; };
-
-	void deleteSelectedPage();
-	void clear();
-	void calculateSize();
-
-private:
-
-	enum State {
-		None = 0,
-		StartDrag = 1,
-		StartSelection = 2
-	};
-
-	enum Mode {
-		Invalid = 0,
-		Insert = 1,
-		Add = 2,
-		Hover = 3
-	};
-
-	QSize m_pageSize;
-	QSizeF m_documentPageSize;
-	int m_rowHeight {96};
-	int m_cellGap {1};
-	int m_groupSpace {16};
-	int m_rowSpace {12};
-	int m_fontSize {8}; // font size of number label and masterpage label
-	int m_labelGap {8}; // gap between page and number label
-	QRect m_rectInsert {QRect()};
-	QRect m_rectSelection {QRect()};
-	QRect m_rectAdd {QRect()};
-	QColor m_colorSelection;
-	int m_selectedPage {-1};
-	int m_hoveredPage {-1};
-	bool m_enableSelection {false};
-	QPoint m_mousePos;
-	State m_state {State::None};
-	PageLayout m_pageLayout {PageLayout::singlePage};
-	int m_cellsInGroup {1}; // 1 for single page
-	int m_pageOffset {0};
-	QMenu *m_contextMenu;
-
-	int columns();
-	int rows();
-
-	int columnAt(QPoint pos);
-	int rowAt(QPoint pos);
-	int rowWidth(int rowId);
-	QRect rectAt(int row, int col);
-
-	QSize dummyPageSize();
-
-	QPoint mapPosToCell(QPoint pos, Mode &mode);
-	QPoint pagePosition(int pageId);
-
-	int clampPageId(int pageID, bool allowPlusOne = false);
-
-	void updateSelectedPage(QPoint pos);
-	void updateModeMarker(QPoint pos);
-	void clearUi();
-	void drawTile(QPainter &painter, QPoint cellPosition, PageCell * tile, bool selected, bool hovered, QColor labelColor);
-	void initContextMenu();
-
-private slots:
-	void showContextMenu(QPoint pos);
-
-protected:
-
-	void paintEvent(QPaintEvent *event) override;
-	void resizeEvent(QResizeEvent *event) override;
-
-	void dropEvent(QDropEvent * event) override;
-	void dragEnterEvent(QDragEnterEvent *event) override;
-	void dragLeaveEvent(QDragLeaveEvent *event) override;
-	void dragMoveEvent(QDragMoveEvent *event) override;
-	void mouseReleaseEvent(QMouseEvent *event) override;
-	void mousePressEvent(QMouseEvent* event) override;
-	void mouseMoveEvent(QMouseEvent* event) override;
-
+	void setDocumentPageSize(QSizeF pageSize);
+
+	void setRowHeight(int size);
+	int rowHeight() { return m_rowHeight; };
+
+	void setFontSize(int size);
+	int fontSize() { return m_fontSize; };
+
+	void setSelectionColor(QColor color);
+	QColor selectionColor() { return m_colorSelection; };
+
+	void setPageLayout(PageLayout layout);
+	PageLayout pageLayout() { return m_pageLayout; };
+
+	void setPageOffset(int pageCount);
+	int pageOffset() { return m_pageOffset; };
+
+	QList<PageCell*> pageList;
+
+	int pageId(int r, int c, bool clampId = true);
+	int pageId(QPoint pos, bool clampId = true);
+
+	PageCell* getPageItem(int pageIndex);
+
+	int pageCount();
+	int pageHeight();
+
+	void setSelectedPage(int pageID);
+	int selectedPage() { return m_selectedPage; };
+
+	void deleteSelectedPage();
+	void clear();
+	void calculateSize();
+
+private:
+
+	enum State {
+		None = 0,
+		StartDrag = 1,
+		StartSelection = 2
+	};
+
+	enum Mode {
+		Invalid = 0,
+		Insert = 1,
+		Add = 2,
+		Hover = 3
+	};
+
+	QSize m_pageSize;
+	QSizeF m_documentPageSize;
+	int m_rowHeight {96};
+	int m_cellGap {1};
+	int m_groupSpace {16};
+	int m_rowSpace {12};
+	int m_fontSize {QFont().pointSize()}; // font size of number label and masterpage label
+	int m_labelGap {8}; // gap between page and number label
+	QRect m_rectInsert {QRect()};
+	QRect m_rectSelection {QRect()};
+	QRect m_rectAdd {QRect()};
+	QColor m_colorSelection;
+	int m_selectedPage {-1};
+	int m_hoveredPage {-1};
+	bool m_enableSelection {false};
+	QPoint m_mousePos;
+	State m_state {State::None};
+	PageLayout m_pageLayout {PageLayout::singlePage};
+	int m_cellsInGroup {1}; // 1 for single page
+	int m_pageOffset {0};
+	QMenu *m_contextMenu;
+
+	int columns();
+	int rows();
+
+	int columnAt(QPoint pos);
+	int rowAt(QPoint pos);
+	int rowWidth(int rowId);
+	QRect rectAt(int row, int col);
+
+	QSize dummyPageSize();
+
+	QPoint mapPosToCell(QPoint pos, Mode &mode);
+	QPoint pagePosition(int pageId);
+
+	int clampPageId(int pageID, bool allowPlusOne = false);
+
+	void updateSelectedPage(QPoint pos);
+	void updateModeMarker(QPoint pos);
+	void clearUi();
+	void drawTile(QPainter &painter, QPoint cellPosition, PageCell * tile, bool selected, bool hovered, QColor labelColor, bool isRight);
+	void initContextMenu();
+
+private slots:
+	void showContextMenu(QPoint pos);
+
+protected:
+
+	void paintEvent(QPaintEvent *event) override;
+	void resizeEvent(QResizeEvent *event) override;
+
+	void dropEvent(QDropEvent * event) override;
+	void dragEnterEvent(QDragEnterEvent *event) override;
+	void dragLeaveEvent(QDragLeaveEvent *event) override;
+	void dragMoveEvent(QDragMoveEvent *event) override;
+	void mouseReleaseEvent(QMouseEvent *event) override;
+	void mousePressEvent(QMouseEvent* event) override;
+	void mouseMoveEvent(QMouseEvent* event) override;
+
 signals:
-	void useTemplate(QString, int);
-	void newPage(int, QString);
+	void useTemplate(QString, int);
+	void newPage(int, QString);
 	void movePage(int, int);
-	void click(int, int);
+	void click(int, int);
 	void delPageRequest(int);
-	void previewSizeChanged();
-};
+	void previewSizeChanged();
+};
 
-/* ********************************************************************************* *
- *
- * Page Viewer
- *
- * ********************************************************************************* */
-
-class SCRIBUS_API PageViewer : public QWidget
-{
-
-public:
-	PageViewer(QWidget *parent = nullptr);
-	~PageViewer() {};
-
-	PageGrid *pageGrid();
-	void scrollToPage(int pageId);
-
-
+/* ********************************************************************************* *
+ *
+ * Page Viewer
+ *
+ * ********************************************************************************* */
+
+class SCRIBUS_API PageViewer : public QWidget
+{
+
+public:
+	PageViewer(QWidget *parent = nullptr);
+	~PageViewer() {};
+
+	PageGrid *pageGrid();
+	void scrollToPage(int pageId);
+
+
 protected:
-	PageGrid *m_pageGrid;
-	QScrollArea* m_scroll;
-
-	virtual void keyPressEvent(QKeyEvent* event);
-
+	PageGrid *m_pageGrid;
+	QScrollArea* m_scroll;
+
+	virtual void keyPressEvent(QKeyEvent* event);
+
 };
 
-/* ********************************************************************************* *
- *
- * Trash bin
- *
- * ********************************************************************************* */
-
+/* ********************************************************************************* *
+ *
+ * Trash bin
+ *
+ * ********************************************************************************* */
+
 class SCRIBUS_API TrashBin : public QLabel
 {
 	Q_OBJECT
