Skip to content

Commit 758660b

Browse files
committedFeb 11, 2024
Fixed a few bugs
1 parent ca9474d commit 758660b

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed
 

‎src/tabs/library.cpp

+19-8
Original file line numberDiff line numberDiff line change
@@ -5294,7 +5294,11 @@ SKIF_UI_Tab_DrawLibrary (void)
52945294
PLOG_VERBOSE << "Selected app ID " << app.second.id << " from platform ID " << (int)app.second.store << ".";
52955295
selection.appid = app.second.id;
52965296
selection.store = app.second.store;
5297-
selection.category = app.second.skif.category;
5297+
selection.category = (app.second.skif.pinned > 50)
5298+
? "Favorites (pinned)" // Workaround to not expand Favorites tab on launch
5299+
: (app.second.skif.pinned > 0 || (app.second.skif.pinned == -1 && app.second.steam.shared.favorite == 1))
5300+
? "Favorites"
5301+
: app.second.skif.category;
52985302
search_selection.id = selection.appid;
52995303
search_selection.store = selection.store;
53005304
update = true;
@@ -6058,13 +6062,16 @@ SKIF_UI_Tab_DrawLibrary (void)
60586062
pinned_top++;
60596063
else if (pinned_top > 0)
60606064
{
6061-
ImGui::SetCursorPosY (
6062-
ImGui::GetCursorPosY ( )
6063-
- (fOffset / 2.0f)
6064-
- 2.0f * SKIF_ImGui_GlobalDPIScale
6065-
);
6065+
if (! _registry.bUIBorders)
6066+
{
6067+
ImGui::SetCursorPosY (
6068+
ImGui::GetCursorPosY ( )
6069+
// - (fOffset / 2.0f)
6070+
- 1.0f * SKIF_ImGui_GlobalDPIScale
6071+
);
60666072

6067-
ImGui::Separator ( );
6073+
ImGui::Separator ( );
6074+
}
60686075

60696076
ImGui::EndChild ( );
60706077

@@ -6251,7 +6258,11 @@ SKIF_UI_Tab_DrawLibrary (void)
62516258

62526259
selection.appid = app.second.id;
62536260
selection.store = app.second.store;
6254-
selection.category = app.second.skif.category;
6261+
selection.category = (app.second.skif.pinned > 50)
6262+
? "Favorites (pinned)" // Workaround to not expand Favorites tab on launch
6263+
: (app.second.skif.pinned > 0 || (app.second.skif.pinned == -1 && app.second.steam.shared.favorite == 1))
6264+
? "Favorites"
6265+
: app.second.skif.category;
62556266
selected = true;
62566267

62576268
// Only update the last selected value if we're not in hidden view

0 commit comments

Comments
 (0)
Please sign in to comment.