| 60 | |
| 61 | |
| 62 | void Viewer::DoSortParameters(bool singleLine) |
| 63 | { |
| 64 | Config::ProfileData& profile = Config::GetProfileData(); |
| 65 | float sortComboWidth = Gutil::GetUIParamScaled(120.0f, 2.5f); |
| 66 | |
| 67 | const char* sortItems[] = |
| 68 | { |
| 69 | "Natural", "Name", "ModTime", "Size", "Type", "Area", "Width", "Height", "Latitude*", |
| 70 | "Longitude*", "Altitude*", "Roll*", "Pitch*", "Yaw*", "Speed*", "Shutter Speed*", |
| 71 | "Exposure Time*", "F-Stop*", "ISO*", "Aperture*", "Orientation*", "Brightness*", |
| 72 | "Flash*", "Focal Length*", "Time Taken*", "Time Modified*", "Camera Make*", "Description*", |
| 73 | "Shuffle" |
| 74 | }; |
| 75 | |
| 76 | tStaticAssert(tNumElements(sortItems) == int(Config::ProfileData::SortKeyEnum::NumKeys)); |
| 77 | tString label = singleLine ? "##Sort" : "Sort"; |
| 78 | ImGui::SetNextItemWidth(sortComboWidth); |
| 79 | if (ImGui::Combo(label.Chr(), &profile.SortKey, sortItems, tNumElements(sortItems), tNumElements(sortItems)/2)) |
| 80 | SortImages(profile.GetSortKey(), profile.SortAscending); |
| 81 | Gutil::ToolTip("Specifies what property to sort by. An asterisk (*) means\nthe property is stored in image meta-data and may not be\npresent in all images. Shuffle means random order."); |
| 82 | |
| 83 | if (profile.GetSortKey() == Config::ProfileData::SortKeyEnum::Shuffle) |
| 84 | { |
| 85 | ImGui::SameLine(); |
| 86 | if (ImGui::Button(" Reshuffle ")) |
| 87 | { |
| 88 | for (Image* i = Images.First(); i; i = i->Next()) |
| 89 | i->RegenerateShuffleValue(); |
| 90 | SortImages(Config::ProfileData::SortKeyEnum::Shuffle, profile.SortAscending); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | if (singleLine) |
| 95 | ImGui::SameLine(); |
| 96 | if (ImGui::Checkbox("Ascending", &profile.SortAscending)) |
| 97 | SortImages(profile.GetSortKey(), profile.SortAscending); |
| 98 | } |
| 99 | |
| 100 | |
| 101 | void Viewer::ShowThumbnailViewDialog(bool* popen) |
nothing calls this directly
no test coverage detected