GuiLyXFiles: Visually distinguish folders from files (#12584)

This commit is contained in:
Juergen Spitzmueller 2022-10-08 16:44:38 +02:00
parent a20477993b
commit 5ee0ba6403
3 changed files with 3 additions and 1 deletions

View File

@ -628,6 +628,7 @@ dist_images_DATA1X = \
images/layout-toggle_LyX-Code.svgz \
images/layout-toggle_Section.svgz \
images/lyx.svg \
images/lyxfiles-folder.svgz \
images/lyxfiles-system.svgz \
images/lyxfiles-user.svgz \
images/lyx-quit.svgz \

Binary file not shown.

View File

@ -416,6 +416,7 @@ void GuiLyXFiles::updateContents()
filesLW->clear();
QIcon user_icon(getPixmap("images/", "lyxfiles-user", "svgz,png"));
QIcon system_icon(getPixmap("images/", "lyxfiles-system", "svgz,png"));
QIcon folder_icon(getPixmap("images/", "lyxfiles-folder", "svgz,png"));
QStringList cats;
QMap<QString, QString>::const_iterator it = files.constBegin();
QFont capfont;
@ -475,7 +476,7 @@ void GuiLyXFiles::updateContents()
if (!subcatItem) {
subcatItem = new QTreeWidgetItem();
subcatItem->setText(0, subcat);
subcatItem->setIcon(0, file_icon);
subcatItem->setIcon(0, folder_icon);
cats << catsave;
}
subcatItem->addChild(item);