@@ -17,6 +17,8 @@
1717#include "UsersModelPrivate.h"
1818#include "UsersModel.h"
1919
20+#include <QDir>
21+
2022namespace QLightDM
2123{
2224
@@ -53,6 +55,15 @@ void UsersModelPrivate::resetEntries()
5355 entries[i].uid = i + 1;
5456 }
5557
58+ // Assign backgrounds
59+ QDir backgroundDir("/usr/share/backgrounds");
60+ QStringList backgrounds = backgroundDir.entryList(QDir::Files);
61+ for (int i = 0; i < entries.size(); i++) {
62+ if (entries[i].background.isNull()) {
63+ entries[i].background = backgroundDir.filePath(backgrounds[i % backgrounds.size()]);
64+ }
65+ }
66+
5667 q->endResetModel();
5768}
5869
@@ -96,7 +107,7 @@ void UsersModelPrivate::resetEntries_full()
96107 { "wide-info-prompt", "Wide Info Prompt", 0, 0, false, false, "ubuntu", 0 },
97108 { "multi-info-prompt", "Multi Info Prompt", 0, 0, false, false, "ubuntu", 0 },
98109 { "long-name", "Long name (far far too long to fit, seriously this would never fit on the screen, you will never see this part of the name)", 0, 0, false, false, "ubuntu", 0 },
99− { "color-background", "Color Background", "#dd4814", 0, false, false, "ubuntu", 0 },
110+ { "color-background", "Color Background", "#E95420", 0, false, false, "ubuntu", 0 },
100111 // white and black are a bit redundant, but useful for manually testing if UI is still readable
101112 { "white-background", "White Background", "#ffffff", 0, false, false, "ubuntu", 0 },
102113 { "black-background", "Black Background", "#000000", 0, false, false, "ubuntu", 0 },