mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-06-19 13:50:09 +10:00
Fix search results overlapping (#1648)
Changes in be8568 commit caused that under certain circumstances search results may overlap "Search the Internet" item.
This commit is contained in:
@@ -2769,8 +2769,8 @@ bool CMenuContainer::InitSearchItems( void )
|
|||||||
itemHeight=s_Skin.ItemSettings[MenuSkin::LIST_ITEM].itemHeight;
|
itemHeight=s_Skin.ItemSettings[MenuSkin::LIST_ITEM].itemHeight;
|
||||||
// total height minus the search box and the "more results"/"search internet", if present
|
// total height minus the search box and the "more results"/"search internet", if present
|
||||||
maxHeight=m_Items[m_SearchIndex].itemRect.top-s_Skin.Main_search_padding.top-s_Skin.Search_padding.top;
|
maxHeight=m_Items[m_SearchIndex].itemRect.top-s_Skin.Main_search_padding.top-s_Skin.Search_padding.top;
|
||||||
maxHeight-=itemHeight*(m_SearchItemCount-(s_bMoreResults?1:2));
|
maxHeight-=itemHeight*(m_SearchItemCount-1);
|
||||||
if (!s_SearchResults.bSearching && !HasMoreResults())
|
if (!s_bMoreResults || (!s_SearchResults.bSearching && !HasMoreResults()))
|
||||||
maxHeight+=itemHeight;
|
maxHeight+=itemHeight;
|
||||||
}
|
}
|
||||||
if (bAutoComlpete)
|
if (bAutoComlpete)
|
||||||
|
|||||||
Reference in New Issue
Block a user