mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:57:45 +00:00
WidgetGallery: Split cursor/icon names based on full paths
Fixes [null] icons since switching to next_full_path iteration
This commit is contained in:
parent
1099521514
commit
a697a2a37a
1 changed files with 6 additions and 6 deletions
|
@ -64,8 +64,8 @@ public:
|
||||||
Cursor cursor;
|
Cursor cursor;
|
||||||
cursor.path = move(path);
|
cursor.path = move(path);
|
||||||
cursor.bitmap = Gfx::Bitmap::load_from_file(cursor.path);
|
cursor.bitmap = Gfx::Bitmap::load_from_file(cursor.path);
|
||||||
auto filename_split = cursor.path.split('.');
|
auto filename_split = cursor.path.split('/');
|
||||||
cursor.name = filename_split[0];
|
cursor.name = filename_split[2];
|
||||||
m_cursors.append(move(cursor));
|
m_cursors.append(move(cursor));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,8 +143,8 @@ public:
|
||||||
continue;
|
continue;
|
||||||
IconSet icon_set;
|
IconSet icon_set;
|
||||||
icon_set.big_icon = Gfx::Bitmap::load_from_file(path);
|
icon_set.big_icon = Gfx::Bitmap::load_from_file(path);
|
||||||
auto filename_split = path.split('.');
|
auto filename_split = path.split('/');
|
||||||
icon_set.name = filename_split[0];
|
icon_set.name = filename_split[3];
|
||||||
m_icon_sets.append(move(icon_set));
|
m_icon_sets.append(move(icon_set));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,8 +158,8 @@ public:
|
||||||
continue;
|
continue;
|
||||||
IconSet icon_set;
|
IconSet icon_set;
|
||||||
icon_set.little_icon = Gfx::Bitmap::load_from_file(path);
|
icon_set.little_icon = Gfx::Bitmap::load_from_file(path);
|
||||||
auto filename_split = path.split('.');
|
auto filename_split = path.split('/');
|
||||||
icon_set.name = filename_split[0];
|
icon_set.name = filename_split[3];
|
||||||
for (size_t i = 0; i < big_icons_found; i++) {
|
for (size_t i = 0; i < big_icons_found; i++) {
|
||||||
if (icon_set.name == m_icon_sets[i].name) {
|
if (icon_set.name == m_icon_sets[i].name) {
|
||||||
m_icon_sets[i].little_icon = icon_set.little_icon;
|
m_icon_sets[i].little_icon = icon_set.little_icon;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue