diff --git a/Src/Lib/SettingsUIHelper.h b/Src/Lib/SettingsUIHelper.h index e85388b8f..387c0b63d 100644 --- a/Src/Lib/SettingsUIHelper.h +++ b/Src/Lib/SettingsUIHelper.h @@ -243,9 +243,10 @@ struct CTreeItem CString icon; CString iconD; unsigned int settings; + int rows; // rows per column of a Pinned programs list (0 - no limit) const CStdCommand *pStdCommand; // always valid - CTreeItem( void ) { settings=0; pStdCommand=NULL; } + CTreeItem( void ) { settings=0; rows=0; pStdCommand=NULL; } void SetCommand( CString command, const CStdCommand *pStdCommands, int style, int mask ); unsigned int GetIconKey( void ) const; HICON LoadIcon( bool bSmall, std::vector &modules ) const; diff --git a/Src/StartMenu/StartMenuDLL/CustomMenu.cpp b/Src/StartMenu/StartMenuDLL/CustomMenu.cpp index 8e7875c74..0cc9fdf96 100644 --- a/Src/StartMenu/StartMenuDLL/CustomMenu.cpp +++ b/Src/StartMenu/StartMenuDLL/CustomMenu.cpp @@ -55,6 +55,7 @@ static StdMenuItem g_StdMenu[]= {L"switch_user",MENU_SWITCHUSER}, {L"lock",MENU_LOCK}, {L"*recent_programs",MENU_RECENT_PROGRAMS}, + {L"*pinned_programs",MENU_PINNED_PROGRAMS}, {L"search_box",MENU_SEARCH_BOX}, {L"*apps",MENU_APPS}, @@ -285,6 +286,9 @@ static void ParseMenuItem( StdMenuItem &item, const wchar_t *name ) item.iconPath=g_CustomMenuParser.FindSetting(buf); item.settings=ParseItemSettings(name); + Sprintf(buf,_countof(buf),L"%s.Rows",name); + str=g_CustomMenuParser.FindSetting(buf); + item.rows=str?_wtol(str):0; if (custom7>=0) { if (g_StdCommands7[custom7].flags&CStdCommand7::ITEM_SINGLE) @@ -491,6 +495,7 @@ const StdMenuItem *ParseCustomMenu( unsigned int &rootSettings ) item.folder1=item.folder2=NULL; item.label=item.tip=item.iconPath=item.link=NULL; item.settings=0; + item.rows=0; item.submenu=NULL; // handle special names diff --git a/Src/StartMenu/StartMenuDLL/DragDrop.cpp b/Src/StartMenu/StartMenuDLL/DragDrop.cpp index 7b3262db8..f272f75f0 100644 --- a/Src/StartMenu/StartMenuDLL/DragDrop.cpp +++ b/Src/StartMenu/StartMenuDLL/DragDrop.cpp @@ -609,7 +609,8 @@ HRESULT STDMETHODCALLTYPE CMenuContainer::DragOver( DWORD grfKeyState, POINTL pt } else { - if (!m_bSubMenu && indexrc.top-m_ScrollButtonSize) pos=rc.top-m_ScrollButtonSize; else if (posid!=MENU_NO) { bool bItemsFirst=(m_Options&(CONTAINER_ITEMS_FIRST|CONTAINER_SEARCH))==CONTAINER_ITEMS_FIRST; @@ -1071,7 +1078,7 @@ void CMenuContainer::AddStandardItems( void ) const StdMenuItem *pInlineParent=NULL; int searchProviderIndex=-1; m_SearchProvidersCount=0; - bool bSecondColumn=false; + int breaks=0, breakCount=CountColumnBreaks(m_pStdItem); // for the icon size of the items in the second pane for (const StdMenuItem *pStdItem=m_pStdItem;;pStdItem++) { if (pStdItem->id==MENU_LAST) @@ -1090,7 +1097,7 @@ void CMenuContainer::AddStandardItems( void ) continue; if (pStdItem->id==MENU_COLUMN_BREAK && !m_bSubMenu && s_Skin.TwoColumns) - bSecondColumn=true; + breaks++; int stdOptions=GetStdOptions(pStdItem->id); if (!(stdOptions&MENU_ENABLED)) continue; @@ -1190,6 +1197,17 @@ void CMenuContainer::AddStandardItems( void ) item.bAlignBottom=bAlignBottom; item.bInlineFirst=bInlineFirst; bAlignBottom=bInlineFirst=false; + + if (pStdItem->id==MENU_PINNED_PROGRAMS) + { + // a placeholder, replaced once all other items are known (PlacePinnedPrograms). + // only the Classic main menu can place its pinned programs + if (pInlineParent || m_bSubMenu || s_bWin7Style) + continue; + m_Items.insert(m_Items.begin()+menuIdx,1,item); + menuIdx++; + continue; + } TNetworkType networkType=NETWORK_NONE; Assert(pStdItem->folder1 || !pStdItem->folder2); @@ -1271,7 +1289,7 @@ void CMenuContainer::AddStandardItems( void ) item.bSplit=item.bFolder && (item.pStdItem->settings&StdMenuItem::MENU_SPLIT_BUTTON)!=0; // get icon - MenuSkin::TIconSize mainIconSize=!bSecondColumn ? s_Skin.Main_icon_size : s_Skin.Main2_icon_size; + MenuSkin::TIconSize mainIconSize=!IsSecondPaneAfterBreaks(breaks,breakCount) ? s_Skin.Main_icon_size : s_Skin.Main2_icon_size; if (item.bInline && mainIconSize==MenuSkin::ICON_SIZE_NONE) mainIconSize=s_Skin.Main_icon_size; @@ -1496,9 +1514,256 @@ void CMenuContainer::AddStandardItems( void ) menuIdx++; } } + PlacePinnedPrograms(bPlacePinned); + } +} + +// Passes a placeholder's column break and bottom alignment to the item that takes its place +void CMenuContainer::InheritColumnFlags( const MenuItem &placeholder, MenuItem &item ) +{ + if (placeholder.bBreak) item.bBreak=true; + if (placeholder.bAlignBottom) item.bAlignBottom=true; +} + +// Starts a new column after every rows items of items[first..last) +void CMenuContainer::SetOverflowBreaks( std::vector &items, int first, int last, int rows ) +{ + if (rows<=0) return; + for (int i=first+rows;i0) + { + m_PinnedPosition=i; + InheritColumnFlags(placeholder,m_Items[0]); + MovePinnedPadding(); + SetOverflowBreaks(m_Items,0,m_ScrollCount,placeholder.pStdItem?placeholder.pStdItem->rows:0); + } + else if (i<(int)m_Items.size()) + InheritColumnFlags(placeholder,m_Items[i]); + i--; // continue with the item that took the placeholder's place } } +// Moves the bottom alignment from the separator after the pinned programs to the item laid out first +void CMenuContainer::MovePinnedPadding( void ) +{ + // when the menu starts with COLUMN_PADDING, AddStandardItems aligns that separator to the bottom. if the pinned programs + // are laid out later, the alignment belongs to the items laid out first instead + int separator=m_ScrollCount; + if (m_PinnedPosition<=separator+1 || separator+1>=(int)m_Items.size()) return; // the layout order doesn't change + if (m_Items[separator].id!=MENU_SEPARATOR || !m_Items[separator].bAlignBottom) return; + m_Items[separator].bAlignBottom=false; + m_Items[separator+1].bAlignBottom=true; +} + +// The order in which InitWindowInternal lays out the items +void CMenuContainer::GetLayoutOrder( std::vector &order ) +{ + // normally the order of m_Items. with a Pinned Programs item, the items configured before it come first, + // then the pinned programs and their separator, then the rest + int count=(int)m_Items.size(); + order.resize(count); + for (int i=0;ipinnedEnd) // otherwise the pinned programs come first anyway + std::rotate(order.begin(),order.begin()+pinnedEnd,order.begin()+position); +} + +// Where the pinned programs end in m_Items, including the separator after them +int CMenuContainer::GetPinnedEnd( void ) +{ + int end=m_ScrollCount; + if (end<(int)m_Items.size() && m_Items[end].id==MENU_SEPARATOR) + end++; + return end; +} + +// Is the item the separator that AddStandardItems puts after the pinned programs, while a Pinned Programs item places them? +// That separator gets no height: with a Pinned Programs item the user adds separators where they want them +bool CMenuContainer::IsPinnedSeparator( int index ) +{ + return m_PinnedPosition>=0 && index==m_ScrollCount && m_Items[index].id==MENU_SEPARATOR; +} + +// The SecondPane setting in effect +TSecondPane CMenuContainer::GetSecondPaneMode( void ) +{ + // the Windows 7 style always uses the last column, and right-to-left menus are mirrored already + if (s_bWin7Style) return SECOND_PANE_LAST; + TSecondPane mode=(TSecondPane)GetSettingInt(L"SecondPane"); + if (mode==SECOND_PANE_FIRST && s_bRTL) return SECOND_PANE_LAST; + return mode; +} + +// The number of column breaks in a menu's items +int CMenuContainer::CountColumnBreaks( const StdMenuItem *pStdItem ) +{ + int count=0; + for (;pStdItem->id!=MENU_LAST;pStdItem++) + if (pStdItem->id==MENU_COLUMN_BREAK) + count++; + return count; +} + +// Whether the items after the given number of column breaks (out of count) get the second-pane look. +// AddStandardItems needs it for their icon size, before the layout knows the columns +bool CMenuContainer::IsSecondPaneAfterBreaks( int breaks, int count ) +{ + if (m_bSubMenu || !s_Skin.TwoColumns || count==0) return false; + if (s_bWin7Style) return breaks>0; // the Windows 7 style uses only the first break + switch (GetSecondPaneMode()) + { + case SECOND_PANE_NONE: return false; + case SECOND_PANE_FIRST: return breaks==0; + default: return breaks==count; + } +} + +// Reads the SecondPane setting for the layout. Returns the position in the layout order of the last column break, +// or -1 when only the first break starts a column (the Windows 7 style keeps two columns) +int CMenuContainer::InitSecondPane( const std::vector &order ) +{ + m_bSecondPane=true; + m_bSecondPaneFirst=false; + m_Pane2Column=1; // until a column break says otherwise + if (!IsClassicMainMenu()) + return -1; + + int lastBreak=-1; + for (int k=1;k<(int)order.size();k++) + if (m_Items[order[k]].bBreak && !m_Items[order[k]].bOverflow) // overflow columns never change the panes + lastBreak=k; + TSecondPane mode=GetSecondPaneMode(); + if (mode==SECOND_PANE_NONE) + m_bSecondPane=false; // every break starts another first-pane column + else if (mode==SECOND_PANE_FIRST && lastBreak>=0) + m_bSecondPaneFirst=true; // the first column has the second-pane look, every break starts a first-pane column + return lastBreak; +} + +// The pane (0 or 1) of the column that a column break starts, given the pane of the column before it. +// Remembers where the panes meet in m_Pane2Column +int CMenuContainer::GetPaneOfNewColumn( int column, int pane, bool bLastBreak ) +{ + if (m_bSecondPaneFirst) + { + if (pane==1) + m_Pane2Column=column; // the first break ends the second pane + return 0; + } + if (m_bSecondPane && bLastBreak) + { + m_Pane2Column=column; + return 1; + } + return pane; +} + +// Sets m_PaneColumns from m_Pane2Column once the number of columns is known +void CMenuContainer::UpdatePaneColumns( void ) +{ + int count=(int)m_ColumnOffsets.size(); + int boundary=m_Pane2Column &columnWidths ) +{ + const PaneColumns &columns=m_PaneColumns[pane]; + if (columns.last<=columns.first) return 0; + return m_ColumnOffsets[columns.last-1]+columnWidths[columns.last-1]-m_ColumnOffsets[columns.first]; +} + +// The left edge of a column, in window coordinates. Each pane starts at its own content rectangle +int CMenuContainer::GetColumnX( int column ) +{ + if (IsSecondPaneColumn(column)) + return m_rContent2.left+m_ColumnOffsets[column]-m_ColumnOffsets[m_PaneColumns[1].first]; + return m_rContent.left+m_ColumnOffsets[column]-m_ColumnOffsets[m_PaneColumns[0].first]; +} + +// Where the pager scrolls: the content of a sub-menu, or the column of the main menu where the pinned programs start +RECT CMenuContainer::GetScrollRect( void ) +{ + if (!m_bTwoColumns || m_ColumnOffsets.empty()) + return m_rContent; + int column=GetScrollColumn(); + int pane=IsSecondPaneColumn(column)?1:0; + RECT rc=pane?m_rContent2:m_rContent; + rc.left=GetColumnX(column); + if (column+1 &shifts ) +{ + shifts.assign(m_ColumnOffsets.size(),0); + for (int i=0;i=rc.left && pt.x order; // positions below are in this order (see GetLayoutOrder) + GetLayoutOrder(order); + int lastBreak=InitSecondPane(order); + { int row=0, column=0, subColumn=0; int y=0; int maxw=0; - int index=0; - for (int i=0;i<(int)m_Items.size();i++) + int index=m_bSecondPaneFirst?1:0; + int overflowTop=0; // where the pinned programs start, so their overflow columns line up with them + for (int k=0;k<(int)order.size();k++) { + int i=order[k]; MenuItem &item=m_Items[i]; - if (m_bTwoColumns && column==0 && i>0 && item.bBreak) + bool bColumnBreak=item.bBreak && !item.bOverflow && (index==0 || m_bSecondPaneFirst) && (column==0 || lastBreak>=0); + bool bOverflowBreak=item.bOverflow && !s_bWin7Style; + if (m_bTwoColumns && k>0 && (bColumnBreak || bOverflowBreak)) { // start a new column column++; @@ -3256,8 +3531,13 @@ void CMenuContainer::InitWindowInternal( bool bDontShrink, const POINT &corner, else y=s_Skin.User_frame_position.x+s_Skin.User_image_padding.y-menuPadding[0].top; } - index=1; + if (item.bOverflow) + y=overflowTop; // stays in the same pane + else + index=GetPaneOfNewColumn(column,index,lastBreak<0 || k==lastBreak); } + if (i==0 && m_ScrollCount>0) + overflowTop=y; item.bNew=false; if (m_bTwoColumns && im_SearchIndex) && item.id!=MENU_SHUTDOWN_BUTTON) { @@ -3369,6 +3649,8 @@ void CMenuContainer::InitWindowInternal( bool bDontShrink, const POINT &corner, h=0; // hide it for now else if (!s_bShowTopEmpty && m_Items.size()>1 && (m_Items[i].id==MENU_EMPTY_TOP || (i>0 && m_Items[i-1].id==MENU_EMPTY_TOP))) h=0; // this is the first (Empty) item in the top menu. hide it for now + else if (IsPinnedSeparator(i)) + h=0; else if (item.bInline) { h=iconSize+settings.iconPadding.top+settings.iconPadding.bottom; @@ -3455,7 +3737,7 @@ void CMenuContainer::InitWindowInternal( bool bDontShrink, const POINT &corner, y=0; } } - else if (item.id==MENU_SEPARATOR && !item.bBlankSeparator && !item.bInline && m_bTwoColumns && column==0 && i+1<(int)m_Items.size() && m_Items[i+1].bBreak) + else if (item.id==MENU_SEPARATOR && !item.bBlankSeparator && !item.bInline && m_bTwoColumns && (index==0 || m_bSecondPaneFirst) && k+1<(int)order.size() && m_Items[order[k+1]].bBreak) h=0; item.row=row; item.column=column; @@ -3490,6 +3772,8 @@ void CMenuContainer::InitWindowInternal( bool bDontShrink, const POINT &corner, row++; } } + if (!m_bSecondPane) + m_Pane2Column=(int)columnWidths.size(); // past the last column: every column is in the first pane SelectObject(hdc,font0); DeleteDC(hdc); @@ -3561,7 +3845,8 @@ void CMenuContainer::InitWindowInternal( bool bDontShrink, const POINT &corner, // calculate the horizontal position of each item int maxw=0; - int maxh[2]={0,0}; + int maxh[2]={0,0}; // height of the tallest column in each pane + int scrollHeight=0; // the pager scrolls only the column of the main menu where the pinned programs start int scrollWidth=GetSystemMetrics(SM_CXVSCROLL); { m_ColumnOffsets.resize(columnWidths.size()); @@ -3571,6 +3856,7 @@ void CMenuContainer::InitWindowInternal( bool bDontShrink, const POINT &corner, m_ColumnOffsets[i]=maxw; maxw+=columnWidths[i]; } + UpdatePaneColumns(); columnWidths.push_back(maxw); bool bInline=false; for (int i=0;i<(int)m_Items.size();i++) @@ -3606,16 +3892,11 @@ void CMenuContainer::InitWindowInternal( bool bDontShrink, const POINT &corner, item.itemRect.right-=scrollWidth; } } - if (m_bTwoColumns) - { - if (maxh[item.column]2) { - w1=columnWidths[0]; - w2=columnWidths[1]; + w1=GetPaneWidth(0,columnWidths); + w2=GetPaneWidth(1,columnWidths); if (s_bWin7Style) { @@ -3794,10 +4075,16 @@ void CMenuContainer::InitWindowInternal( bool bDontShrink, const POINT &corner, MenuItem &item=m_Items[i]; int dx=m_rContent.left; int dy=m_rContent.top; - if (m_bTwoColumns && item.column==1) + if (m_bTwoColumns) { - dx=m_rContent2.left-m_ColumnOffsets[1]; - dy=m_rContent2.top; + // each pane starts at its own content rectangle + if (IsSecondPaneColumn(item.column)) + { + dx=m_rContent2.left-m_ColumnOffsets[m_PaneColumns[1].first]; + dy=m_rContent2.top; + } + else if (m_PaneColumns[0].first<(int)m_ColumnOffsets.size()) + dx=m_rContent.left-m_ColumnOffsets[m_PaneColumns[0].first]; } if (item.id==MENU_SHUTDOWN_BUTTON) dx=0; @@ -3806,49 +4093,22 @@ void CMenuContainer::InitWindowInternal( bool bDontShrink, const POINT &corner, if (m_bTwoColumns && columnWidths.size()>2) { - int dh1=0, dh2=0; - for (int i=0;i columnDH; + GetColumnBottomShifts(columnDH); + // only the Windows 7 style trims overlapping items below, and it always has the second pane in column m_Pane2Column + int dh1=columnDH[0], dh2=m_Pane2Column<(int)columnDH.size()?columnDH[m_Pane2Column]:0; - bool bAlign1=false, bAlign2=false; + std::vector bAlign(columnDH.size(),false); for (int i=0;imaxHeight[0] && m_ScrollCount>0 && (m_bSubMenu || !s_bWin7Style)) + int scrollPane=IsSecondPaneColumn(GetScrollColumn())?1:0; // the pinned programs can have the second-pane look + int scrollTop=GetScrollRect().top; + if (!bMultiColumn && scrollHeight>maxHeight[scrollPane] && m_ScrollCount>0 && (m_bSubMenu || !s_bWin7Style)) { - int d=maxh[0]-maxHeight[0]; - m_ScrollHeight=m_Items[m_ScrollCount-1].itemRect.bottom-d-m_rContent.top; + int d=scrollHeight-maxHeight[scrollPane]; + m_ScrollHeight=m_Items[m_ScrollCount-1].itemRect.bottom-d-scrollTop; if (m_ScrollHeight<=0) { if (m_ScrollCount<(int)m_Items.size()) - d=m_Items[m_ScrollCount].itemRect.bottom-m_rContent.top; + d=m_Items[m_ScrollCount].itemRect.bottom-scrollTop; m_ScrollOffset=m_ScrollHeight=0; for (int i=0;i::iterator it=s_MenuScrolls.find(m_FolderHash[0]); @@ -4068,7 +4330,7 @@ void CMenuContainer::InitWindowInternal( bool bDontShrink, const POINT &corner, { for (int i=m_ScrollCount;ibottom) m_Items[i].itemRect.bottom=m_Items[i].itemRect.top; } @@ -4120,8 +4382,8 @@ void CMenuContainer::InitWindowInternal( bool bDontShrink, const POINT &corner, { m_SearchBox.Create(L"EDIT",m_hWnd,itemRect,NULL,WS_CHILD|(s_Skin.Search_frame?WS_BORDER:0)|ES_AUTOHSCROLL|ES_WANTRETURN); SetWindowSubclass(m_SearchBox,SubclassSearchBox,(UINT_PTR)this,0); - int index=(m_bTwoColumns && m_Items[m_SearchIndex].column==1)?1:0; - if (index==1 && (m_SearchIndex==0 || m_Items[m_SearchIndex-1].column==0)) + int index=IsSecondPaneColumn(m_Items[m_SearchIndex].column)?1:0; + if (index==1 && (m_SearchIndex==0 || !IsSecondPaneColumn(m_Items[m_SearchIndex-1].column))) m_SearchBox.SetFont(s_Skin.ItemSettings[MenuSkin::COLUMN2_ITEM].font); else m_SearchBox.SetFont(s_Skin.ItemSettings[MenuSkin::COLUMN1_ITEM].font); @@ -4355,7 +4617,7 @@ void CMenuContainer::UpdateScroll( void ) else { m_bScrollUp=(m_ScrollOffset>0); - m_bScrollDown=(m_ScrollOffset+m_ScrollHeight0 && index=m_rContent.top+m_ScrollHeight-m_ScrollButtonSize) + if (m_bScrollDown && rc.top>=scrollTop+m_ScrollHeight-m_ScrollButtonSize) return false; } if (m_SearchScrollCount>m_SearchScrollHeight && index>=m_OriginalCount) @@ -4529,10 +4792,12 @@ bool CMenuContainer::GetItemRect( int index, RECT &rc ) int CMenuContainer::HitTest( const POINT &pt, bool *bArrow, bool bDrop ) { - if (m_bScrollUp && pt.y=m_rContent.top+m_ScrollHeight-m_ScrollButtonSize) + if (m_bScrollDown && bInPager && pt.y>=scrollTop+m_ScrollHeight-m_ScrollButtonSize) start=m_ScrollCount; int n=(int)m_Items.size(); for (int i=start;itotal) { scroll=total; @@ -5276,7 +5541,7 @@ LRESULT CMenuContainer::OnTimer( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& else if (m_bScrollDown && m_bScrollDownHot) { scroll+=s_Skin.ItemSettings[m_bSubMenu?MenuSkin::SUBMENU_ITEM:MenuSkin::COLUMN1_ITEM].itemHeight*speed/6; - int total=m_Items[m_ScrollCount-1].itemRect.bottom-m_rContent.top-m_ScrollHeight; + int total=GetScrollRange(); if (scroll>total) scroll=total; } if (m_ScrollOffset!=scroll) @@ -5745,7 +6010,7 @@ LRESULT CMenuContainer::OnKeyDown( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL if (index<0) { // no item is selected - find the first selectable item in the last column then go up - int col=(m_bTwoColumns?1:0); + int col=(m_bTwoColumns?(int)m_ColumnOffsets.size()-1:0); index=0; for (int i=0;i0) - scrollOffset=m_Items[m_ScrollCount-1].itemRect.bottom-m_rContent.top-m_ScrollHeight; + scrollOffset=GetScrollRange(); if (index0) - scrollOffset=m_Items[m_ScrollCount-1].itemRect.bottom-m_rContent.top-m_ScrollHeight; + scrollOffset=GetScrollRange(); if (indextotal) scroll=total; if (m_ScrollOffset!=scroll) { @@ -8606,7 +8871,7 @@ HWND CMenuContainer::ToggleStartMenu( int taskbarId, bool bKeyboard, bool bAllPr if (pStartMenu->m_SearchIndex>=0 && GetSettingInt(L"SearchBox")==SEARCHBOX_NORMAL && GetSettingBool(L"SearchSelect")) { pStartMenu->ActivateItem(pStartMenu->m_SearchIndex,ACTIVATE_SELECT,NULL); - if (pStartMenu->m_bTwoColumns && pStartMenu->m_Items[pStartMenu->m_SearchIndex].column==0 && pStartMenu->m_SearchIndex+1<(int)pStartMenu->m_Items.size() && pStartMenu->m_Items[pStartMenu->m_SearchIndex+1].column==1) + if (pStartMenu->m_bTwoColumns && pStartMenu->m_Items[pStartMenu->m_SearchIndex].column==0 && pStartMenu->m_SearchIndex+1<(int)pStartMenu->m_Items.size() && pStartMenu->m_Items[pStartMenu->m_SearchIndex+1].column!=0) s_bOverrideFirstDown=true; } else if (!bTreeSelected) diff --git a/Src/StartMenu/StartMenuDLL/MenuContainer.h b/Src/StartMenu/StartMenuDLL/MenuContainer.h index 057982104..b612b4c39 100644 --- a/Src/StartMenu/StartMenuDLL/MenuContainer.h +++ b/Src/StartMenu/StartMenuDLL/MenuContainer.h @@ -25,6 +25,7 @@ #endif enum TRecentPrograms; +enum TSecondPane; enum TMenuID { @@ -97,6 +98,7 @@ enum TMenuID MENU_RESTART_NOUPDATE, MENU_SHUTDOWN_NOUPDATE, MENU_SHUTDOWN_HYBRID, + MENU_PINNED_PROGRAMS, // places the pinned programs in the Classic two-column main menu MENU_IGNORE=1024, // ignore this item }; @@ -113,6 +115,7 @@ struct StdMenuItem const wchar_t *iconPath; const wchar_t *link; unsigned int settings; + int rows; // Pinned programs list: rows per column before the list continues in the next column (0 - no limit) const StdMenuItem *submenu; CString labelString, tipString; // additional storage for the strings @@ -453,7 +456,7 @@ class CMenuContainer: public IDropTarget, public IFrameworkInputPaneHandler, pub drawType=MenuSkin::COLUMN1_ITEM; column=row=0; memset(&itemRect,0,sizeof(itemRect)); - bFolder=bLink=bPrograms=bAlignBottom=bBreak=bInline=bInlineFirst=bInlineLast=bSplit=bHasJumpList=bMetroLink=bMetroApp=bBlankSeparator=bNew=bStartScreen=bCustomAccelerator=false; + bFolder=bLink=bPrograms=bAlignBottom=bBreak=bInline=bInlineFirst=bInlineLast=bSplit=bHasJumpList=bMetroLink=bMetroApp=bBlankSeparator=bNew=bStartScreen=bCustomAccelerator=bOverflow=false; priority=0; pItem1=pItem2=NULL; mfuHash=0; @@ -490,6 +493,7 @@ class CMenuContainer: public IDropTarget, public IFrameworkInputPaneHandler, pub bool bBlankSeparator:1; // this is a blank separator that is the same size as normal items bool bNew:1; // this is a highlighted new item bool bStartScreen:1; // this is the start screen shortcut item + bool bOverflow:1; // starts a column because its list has more items than rows per column (see SetOverflowBreaks) bool bCustomAccelerator:1; // the accelerator is specified explicitly char priority; // used for sorting of the All Programs menu (0 for Start Menu, 1 for the separator, 2 for the Programs) char drive; @@ -661,6 +665,15 @@ class CMenuContainer: public IDropTarget, public IFrameworkInputPaneHandler, pub POINT m_PaintOffset; int m_MaxWidth; bool m_bTwoColumns; + int m_PinnedPosition; // Classic two-column main menu: the pinned programs (items 0..m_ScrollCount) are laid out just before this item. -1 when they come first + bool m_bSecondPane; // false when the SecondPane setting gives no column the second-pane look + bool m_bSecondPaneFirst; // SecondPane=First: the second pane is the columns before m_Pane2Column, on the left + int m_Pane2Column; // where the panes meet: the second pane starts here (or ends here with m_bSecondPaneFirst) + struct PaneColumns + { + int first, last; // [first,last) + }; + PaneColumns m_PaneColumns[2]; // the columns of the first and the second pane, set by InitWindowInternal RECT m_rMenu; RECT m_rContent; RECT m_rContent2; @@ -701,6 +714,28 @@ class CMenuContainer: public IDropTarget, public IFrameworkInputPaneHandler, pub int AddSearchItems( const std::vector &items, const CString &categoryName, unsigned int categoryHash, int originalCount ); void GetRecentPrograms( std::vector &items, int maxCount ); + static void InheritColumnFlags( const MenuItem &placeholder, MenuItem &item ); + static void SetOverflowBreaks( std::vector &items, int first, int last, int rows ); + void PlacePinnedPrograms( bool bSetPosition ); + void MovePinnedPadding( void ); + void GetLayoutOrder( std::vector &order ); + int GetPinnedEnd( void ); + bool IsPinnedSeparator( int index ); + static TSecondPane GetSecondPaneMode( void ); + static int CountColumnBreaks( const StdMenuItem *pStdItem ); + bool IsSecondPaneAfterBreaks( int breaks, int count ); + int InitSecondPane( const std::vector &order ); + int GetPaneOfNewColumn( int column, int pane, bool bLastBreak ); + void UpdatePaneColumns( void ); + int GetPaneWidth( int pane, const std::vector &columnWidths ); + int GetColumnX( int column ); + RECT GetScrollRect( void ); + int GetScrollRange( void ); + bool IsInScrollColumn( const POINT &pt ); + void GetColumnBottomShifts( std::vector &shifts ); + int GetScrollColumn( void ) { return (m_ScrollCount>0 && !m_Items.empty())?m_Items[0].column:0; } // where the pinned programs start + bool IsClassicMainMenu( void ) { return m_bTwoColumns && !m_bSubMenu && !s_bWin7Style; } + bool IsSecondPaneColumn( int column ) { return column>=m_PaneColumns[1].first && column0 && !s_bRTL; + int pane1[2]={0,totalWidth1}, pane2[2]={totalWidth1,totalWidth}; // [left,right) of each pane, to align emblems and the user + if (bPane2First) + { + pane2[0]=textHeight; + pane2[1]=textHeight+totalWidth2; + pane1[0]=pane2[1]; + pane1[1]=totalWidth; + } totalHeight=height1+menuPadding[0].top+menuPadding[0].bottom; - if (m_bTwoColumns) + if (m_bTwoColumns && m_bSecondPane) { int totalHeight2=height2+menuPadding[1].top+menuPadding[1].bottom; if (totalHeight0) - pos.x=totalWidth1+(totalWidth2-frameSize.cx)/2; + pos.x=(pane2[0]+pane2[1]-frameSize.cx)/2; else pos.x=(totalWidth-frameSize.cx)/2; } @@ -1228,10 +1274,7 @@ void CMenuContainer::CreateBackground( int width1, int width2, int height1, int { RECT rc0; int x0=0, x1=totalWidth; - if (s_Skin.User_name_align==MenuSkin::HALIGN_CENTER1 || s_Skin.User_name_align==MenuSkin::HALIGN_LEFT1 || s_Skin.User_name_align==MenuSkin::HALIGN_RIGHT1) - x1=totalWidth1; - else if (s_Skin.User_name_align==MenuSkin::HALIGN_CENTER2 || s_Skin.User_name_align==MenuSkin::HALIGN_LEFT2 || s_Skin.User_name_align==MenuSkin::HALIGN_RIGHT2) - x0=totalWidth1; + AlignToPane(s_Skin.User_name_align,pane1,pane2,x0,x1); if (s_Skin.User_name_position.left<0) rc0.left=x1+s_Skin.User_name_position.left; @@ -1606,8 +1649,13 @@ void CMenuContainer::DrawBackground( HDC hdc, const RECT &drawRect ) MenuBitmap bmpPagerArrows; SIZE pagArrowSize; MenuSkin::TOpacity opacity=m_bSubMenu?s_Skin.Submenu_opacity:s_Skin.Main_opacity; - int glow=s_Skin.ItemSettings[m_bSubMenu?MenuSkin::SUBMENU_ITEM:MenuSkin::COLUMN1_ITEM].glowSize; + // the scrolling items can be in the second pane + const MenuSkin::ItemDrawSettings &scrollSettings=s_Skin.ItemSettings[m_bSubMenu?MenuSkin::SUBMENU_ITEM:(IsSecondPaneColumn(GetScrollColumn())?MenuSkin::COLUMN2_ITEM:MenuSkin::COLUMN1_ITEM)]; + int glow=scrollSettings.glowSize; if (!s_Theme) glow=0; + // composited text ignores the clip rectangle, so the pager buttons need their background drawn again (see DrawThemeTextEx below) + bool bTextSpills=(glow || opacity==MenuSkin::OPACITY_FULLALPHA || opacity==MenuSkin::OPACITY_FULLGLASS || + scrollSettings.opacity==MenuSkin::OPACITY_FULLALPHA || scrollSettings.opacity==MenuSkin::OPACITY_FULLGLASS); TRecentKeys recentType=(TRecentKeys)GetSettingInt(L"RecentProgKeys"); if (m_bSubMenu) @@ -1638,13 +1686,14 @@ void CMenuContainer::DrawBackground( HDC hdc, const RECT &drawRect ) HGDIOBJ font0=GetCurrentObject(hdc,OBJ_FONT); SetBkMode(hdc,TRANSPARENT); - // set clip rectangle for the scrollable items - int clipTop=m_rContent.top; - int clipBottom=m_rContent.bottom; + // set clip rectangle for the scrollable items (the pager covers only the column that scrolls, see GetScrollRect) + RECT rScroll=GetScrollRect(); + int clipTop=rScroll.top; + int clipBottom=rScroll.bottom; if (m_bScrollUp) - clipTop=m_rContent.top+m_ScrollButtonSize; + clipTop=rScroll.top+m_ScrollButtonSize; if (m_bScrollDown) - clipBottom=m_rContent.top+m_ScrollHeight-m_ScrollButtonSize; + clipBottom=rScroll.top+m_ScrollHeight-m_ScrollButtonSize; if (m_ScrollHeight>0) IntersectClipRect(hdc,0,clipTop,m_rMenu.right,clipBottom); @@ -1665,10 +1714,10 @@ void CMenuContainer::DrawBackground( HDC hdc, const RECT &drawRect ) SelectClipRgn(hdc,NULL); if (m_bScrollUp) { - if (glow || opacity==MenuSkin::OPACITY_FULLALPHA || opacity==MenuSkin::OPACITY_FULLGLASS) + if (bTextSpills) { // fix background behind the up button (DrawThemeTextEx may spill onto the tablecloth) - RECT rc={m_rContent.left,0,m_rContent.right,clipTop}; + RECT rc={rScroll.left,0,rScroll.right,clipTop}; if (bAlphaMain || !bmpMain) { SetDCBrushColor(hdc,m_bSubMenu?s_Skin.Submenu_background:s_Skin.Main_background); @@ -1677,7 +1726,7 @@ void CMenuContainer::DrawBackground( HDC hdc, const RECT &drawRect ) if (bmpMain) { HGDIOBJ bmp0=SelectObject(hdc2,bmpMain); - IntersectClipRect(hdc,m_rContent.left,0,m_rContent.right,clipTop); + IntersectClipRect(hdc,rScroll.left,0,rScroll.right,clipTop); MarginsBlit(hdc2,hdc,rSrcMain,m_rMenu,rMarginsMain,bAlphaMain); SelectObject(hdc2,bmp0); SelectClipRgn(hdc,NULL); @@ -1685,7 +1734,7 @@ void CMenuContainer::DrawBackground( HDC hdc, const RECT &drawRect ) } // draw up button - RECT rc=m_rContent; + RECT rc=rScroll; rc.bottom=clipTop; if (bmpPager.GetBitmap() && bmpPagerArrows.GetBitmap()) { @@ -1722,10 +1771,10 @@ void CMenuContainer::DrawBackground( HDC hdc, const RECT &drawRect ) { int bottom=clipBottom+s_Skin.ItemSettings[m_bSubMenu?MenuSkin::SUBMENU_ITEM:MenuSkin::COLUMN1_ITEM].itemHeight; if (bottom>=m_rMenu.bottom) bottom=m_rMenu.bottom; - if (bottom>clipBottom && (glow || opacity==MenuSkin::OPACITY_FULLALPHA || opacity==MenuSkin::OPACITY_FULLGLASS)) + if (bottom>clipBottom && bTextSpills) { // fix background behind the up button (DrawThemeTextEx may spill onto the tablecloth) - RECT rc={m_rContent.left,clipBottom,m_rContent.right,bottom}; + RECT rc={rScroll.left,clipBottom,rScroll.right,bottom}; if (bAlphaMain || !bmpMain) { SetDCBrushColor(hdc,m_bSubMenu?s_Skin.Submenu_background:s_Skin.Main_background); @@ -1734,7 +1783,7 @@ void CMenuContainer::DrawBackground( HDC hdc, const RECT &drawRect ) if (bmpMain) { HGDIOBJ bmp0=SelectObject(hdc2,bmpMain); - IntersectClipRect(hdc,m_rContent.left,clipBottom,m_rContent.right,bottom); + IntersectClipRect(hdc,rScroll.left,clipBottom,rScroll.right,bottom); MarginsBlit(hdc2,hdc,rSrcMain,m_rMenu,rMarginsMain,bAlphaMain); SelectObject(hdc2,bmp0); SelectClipRgn(hdc,NULL); @@ -1742,8 +1791,8 @@ void CMenuContainer::DrawBackground( HDC hdc, const RECT &drawRect ) } // draw down button - RECT rc=m_rContent; - rc.bottom=m_rContent.top+m_ScrollHeight; + RECT rc=rScroll; + rc.bottom=rScroll.top+m_ScrollHeight; rc.top=clipBottom; if (bmpPager.GetBitmap() && bmpPagerArrows.GetBitmap()) { @@ -2451,18 +2500,23 @@ void CMenuContainer::DrawBackground( HDC hdc, const RECT &drawRect ) } } - // draw vertical separators - if (m_bSubMenu && m_ColumnOffsets.size()>1) + // draw vertical separators between the columns of a sub-menu, or within each pane of the main menu + // (the separator between the two panes is part of the background) + for (int pane=0;pane<2;pane++) { + const RECT &content=pane?m_rContent2:m_rContent; + int sepFirst=m_PaneColumns[pane].first+1, sepLast=m_PaneColumns[pane].last; // separators go before these columns + if (sepFirst>=sepLast) + continue; if (bmpSeparatorV.GetBitmap()) { HGDIOBJ bmp0=SelectObject(hdc2,bmpSeparatorV.GetBitmap()); RECT rSrc={0,0,sepWidth,sepSlicesY[0]+sepSlicesY[1]+sepSlicesY[2]}; RECT rMargins={0,sepSlicesY[0],0,sepSlicesY[2]}; - for (size_t i=1;ipStdCommand && wcscmp(m_pItem->pStdCommand->name,L"pinned_programs")==0; } + void EnableRows( void ); + int m_Style, m_StyleMask; }; @@ -1535,6 +1540,8 @@ LRESULT CEditMenuDlg::OnInitDialog( UINT uMsg, WPARAM wParam, LPARAM lParam, BOO CheckDlgButton(IDC_CHECKINLINE,(m_pItem->settings&StdMenuItem::MENU_INLINE)?BST_CHECKED:BST_UNCHECKED); CheckDlgButton(IDC_CHECKSPLIT,(m_pItem->settings&StdMenuItem::MENU_SPLIT_BUTTON)?BST_CHECKED:BST_UNCHECKED); CheckDlgButton(IDC_CHECKNOEXT,(m_pItem->settings&StdMenuItem::MENU_NOEXTENSIONS)?BST_CHECKED:BST_UNCHECKED); + if (m_pItem->rows>0) SetDlgItemInt(IDC_EDITROWS,m_pItem->rows,FALSE); + EnableRows(); if (m_pItem->pStdCommand && (wcscmp(m_pItem->pStdCommand->name,L"programs")==0 || wcscmp(m_pItem->pStdCommand->name,L"apps")==0)) { CheckDlgButton(IDC_CHECKMULTICOLUMN,BST_CHECKED); @@ -1647,6 +1654,11 @@ LRESULT CEditMenuDlg::OnInitDialog( UINT uMsg, WPARAM wParam, LPARAM lParam, BOO tool.uId=(UINT_PTR)(HWND)GetDlgItem(IDC_CHECKNOEXT); tooltip.SendMessage(TTM_ADDTOOL,0,(LPARAM)&tool); + str=LoadStringEx(IDS_ROWS_TIP); + tool.lpszText=(LPWSTR)(LPCWSTR)str; + tool.uId=(UINT_PTR)(HWND)GetDlgItem(IDC_EDITROWS); + tooltip.SendMessage(TTM_ADDTOOL,0,(LPARAM)&tool); + str=LoadStringEx(IDS_RESTORE_TIP); tool.lpszText=(LPWSTR)(LPCWSTR)str; tool.uId=(UINT_PTR)(HWND)GetDlgItem(IDC_BUTTONRESET); @@ -1677,6 +1689,7 @@ LRESULT CEditMenuDlg::OnOK( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHan if (IsDlgButtonChecked(IDC_CHECKINLINE)==BST_CHECKED) m_pItem->settings|=StdMenuItem::MENU_INLINE; if (IsDlgButtonChecked(IDC_CHECKSPLIT)==BST_CHECKED) m_pItem->settings|=StdMenuItem::MENU_SPLIT_BUTTON; if (IsDlgButtonChecked(IDC_CHECKNOEXT)==BST_CHECKED) m_pItem->settings|=StdMenuItem::MENU_NOEXTENSIONS; + m_pItem->rows=IsPinnedPrograms()?(int)GetDlgItemInt(IDC_EDITROWS,NULL,FALSE):0; if (bForceMultiColumn) { // special handling of the Programs menu @@ -1712,10 +1725,18 @@ LRESULT CEditMenuDlg::OnCommandChanged( WORD wNotifyCode, WORD wID, HWND hWndCtl CheckDlgButton(IDC_CHECKMULTICOLUMN,(m_pItem->settings&StdMenuItem::MENU_MULTICOLUMN)?BST_CHECKED:BST_UNCHECKED); GetDlgItem(IDC_CHECKMULTICOLUMN).EnableWindow(TRUE); } + EnableRows(); UpdateIcons(IDC_ICONN,0); return 0; } +// Rows per column can be set only for the Pinned programs item +void CEditMenuDlg::EnableRows( void ) +{ + GetDlgItem(IDC_STATICROWS).EnableWindow(IsPinnedPrograms()); + GetDlgItem(IDC_EDITROWS).EnableWindow(IsPinnedPrograms()); +} + LRESULT CEditMenuDlg::OnLinkChanged( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled ) { CString text=GetComboText(wNotifyCode,wID); @@ -1816,6 +1837,8 @@ LRESULT CEditMenuDlg::OnReset( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& b CheckDlgButton(IDC_CHECKINLINE,(m_pItem->settings&StdMenuItem::MENU_INLINE)?BST_CHECKED:BST_UNCHECKED); CheckDlgButton(IDC_CHECKSPLIT,(m_pItem->settings&StdMenuItem::MENU_SPLIT_BUTTON)?BST_CHECKED:BST_UNCHECKED); CheckDlgButton(IDC_CHECKNOEXT,(m_pItem->settings&StdMenuItem::MENU_NOEXTENSIONS)?BST_CHECKED:BST_UNCHECKED); + m_pItem->rows=0; + SetDlgItemText(IDC_EDITROWS,L""); if (m_pItem->pStdCommand && (wcscmp(m_pItem->pStdCommand->name,L"programs")==0 || wcscmp(m_pItem->pStdCommand->name,L"apps")==0)) { CheckDlgButton(IDC_CHECKMULTICOLUMN,BST_CHECKED); @@ -1849,6 +1872,9 @@ void CCustomMenuDlg::ParseTreeItemExtra( CTreeItem *pItem, CSettingsParser &pars { pItem->settings=0; wchar_t text[256]; + Sprintf(text,_countof(text),L"%s.Rows",pItem->name); + const wchar_t *rows=parser.FindSetting(text); + pItem->rows=rows?_wtol(rows):0; Sprintf(text,_countof(text),L"%s.Settings",pItem->name); const wchar_t *str=parser.FindSetting(text); if (!str) return; @@ -1875,8 +1901,13 @@ void CCustomMenuDlg::ParseTreeItemExtra( CTreeItem *pItem, CSettingsParser &pars void CCustomMenuDlg::SerializeItemExtra( CTreeItem *pItem, std::vector &stringBuilder ) { - if (!pItem->settings) return; wchar_t text[256]; + if (pItem->rows>0) + { + Sprintf(text,_countof(text),L"%s.Rows=%d\n",pItem->name,pItem->rows); + AppendString(stringBuilder,text); + } + if (!pItem->settings) return; Sprintf(text,_countof(text),L"%s.Settings=",pItem->name); AppendString(stringBuilder,text); if (pItem->settings&StdMenuItem::MENU_OPENUP) AppendString(stringBuilder,L"OPEN_UP|"); @@ -4402,6 +4433,10 @@ CSetting g_Settings[]={ {L"LargeIconSize",CSetting::TYPE_INT,IDS_LARGE_SIZE_SM,IDS_LARGE_SIZE_SM_TIP,-1,CSetting::FLAG_COLD}, // 32 for DPI<=96, 40 for DPI<=120, 48 otherwise {L"InvertMetroIcons",CSetting::TYPE_BOOL,IDS_INVERT_ICONS,IDS_INVERT_ICONS_TIP,0}, {L"MaxMainMenuWidth",CSetting::TYPE_INT,IDS_MENU_WIDTH,IDS_MENU_WIDTH_TIP,60,CSetting::FLAG_MENU_CLASSIC_BOTH}, + {L"SecondPane",CSetting::TYPE_INT,IDS_SECOND_PANE,IDS_SECOND_PANE_TIP,SECOND_PANE_LAST,CSetting::FLAG_MENU_CLASSIC2}, + {L"LastColumn",CSetting::TYPE_RADIO,IDS_SECOND_PANE_LAST,IDS_SECOND_PANE_LAST_TIP}, + {L"None",CSetting::TYPE_RADIO,IDS_SECOND_PANE_NONE,IDS_SECOND_PANE_NONE_TIP}, + {L"FirstColumn",CSetting::TYPE_RADIO,IDS_SECOND_PANE_FIRST,IDS_SECOND_PANE_FIRST_TIP}, {L"MaxMenuWidth",CSetting::TYPE_INT,IDS_SUBMENU_WIDTH,IDS_SUBMENU_WIDTH_TIP,60}, {L"AlignToWorkArea",CSetting::TYPE_BOOL,IDS_ALIGN_WORK_AREA,IDS_ALIGN_WORK_AREA_TIP,0}, {L"HorizontalMenuOffset",CSetting::TYPE_INT,IDS_HOR_OFFSET,IDS_HOR_OFFSET_TIP,0}, diff --git a/Src/StartMenu/StartMenuDLL/SettingsUI.h b/Src/StartMenu/StartMenuDLL/SettingsUI.h index 135585880..85a19fc8c 100644 --- a/Src/StartMenu/StartMenuDLL/SettingsUI.h +++ b/Src/StartMenu/StartMenuDLL/SettingsUI.h @@ -20,6 +20,14 @@ enum TProgramsStyle PROGRAMS_HIDDEN, }; +// the SecondPane setting: which columns get the second-pane look in the Classic two-column menu +enum TSecondPane +{ + SECOND_PANE_LAST, // the column after the last column break + SECOND_PANE_NONE, // no column: all columns look like the first pane + SECOND_PANE_FIRST, // the column before the first column break, drawn on the left +}; + enum TRecentPrograms { RECENT_PROGRAMS_NONE, diff --git a/Src/StartMenu/StartMenuDLL/StartMenuDLL.rc b/Src/StartMenu/StartMenuDLL/StartMenuDLL.rc index d65ffce32..314444123 100644 --- a/Src/StartMenu/StartMenuDLL/StartMenuDLL.rc +++ b/Src/StartMenu/StartMenuDLL/StartMenuDLL.rc @@ -144,6 +144,8 @@ BEGIN CONTROL "Don't track recent items",IDC_CHECKNOTRACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,130,155,97,10 CONTROL "Place items first",IDC_CHECKITEMSFIRST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,130,168,69,10 CONTROL "Hide extensions",IDC_CHECKNOEXT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,130,181,72,10 + LTEXT "Rows per column:",IDC_STATICROWS,130,195,60,8 + EDITTEXT IDC_EDITROWS,192,193,30,12,ES_AUTOHSCROLL | ES_NUMBER PUSHBUTTON "Restore Defaults",IDC_BUTTONRESET,7,215,90,14 DEFPUSHBUTTON "OK",IDOK,135,215,50,14 PUSHBUTTON "Cancel",IDCANCEL,192,215,50,14 @@ -754,7 +756,7 @@ END STRINGTABLE BEGIN IDS_SEPARATOR_TIP "This item separates items in the menu" - IDS_BREAK_TIP "(only for two-column main menus) marks the start of the second column" + IDS_BREAK_TIP "(only for two-column main menus) starts another column. By default the last one starts the second pane" IDS_PADDING_TIP "(only for two-column main menus) moves the rest of the items in the column to the bottom" IDS_PROGRAMS_TIP "The Programs folder - contains all installed programs" IDS_FAVORITES_TIP "The Favorites folder" @@ -1075,6 +1077,20 @@ BEGIN IDS_MAIN_MENU_SETTINGS "Main Menu" IDS_BUTTON_OFFSET "Button offset" IDS_BUTTON_OFFSET_TIP "Offset the start button horizontally by the amount of pixels specified" + IDS_SECOND_PANE "Second pane look" + IDS_SECOND_PANE_TIP "Which column of the menu uses the skin's second (right) pane look. Some skins draw both panes alike; with them this changes little or nothing" + IDS_SECOND_PANE_LAST "Last column" + IDS_SECOND_PANE_LAST_TIP + "The column after the last column break looks like the second pane (the default)" + IDS_SECOND_PANE_NONE "None" + IDS_SECOND_PANE_NONE_TIP + "All columns look like the first pane. Column breaks only start new columns" + IDS_SECOND_PANE_FIRST "First column" + IDS_SECOND_PANE_FIRST_TIP + "The column before the first column break looks like the second pane and is drawn on the left" + IDS_PINNED_ITEM "Pinned programs" + IDS_PINNED_ITEM_TIP "Places the pinned programs here, as a list. Without this item they are at the top of the first column" + IDS_ROWS_TIP "After this many rows the list continues in the next column. Leave empty for no limit" END STRINGTABLE diff --git a/Src/StartMenu/StartMenuDLL/resource.h b/Src/StartMenu/StartMenuDLL/resource.h index 81acb7478..a40e4b46d 100644 --- a/Src/StartMenu/StartMenuDLL/resource.h +++ b/Src/StartMenu/StartMenuDLL/resource.h @@ -101,6 +101,8 @@ #define IDC_SKIN_CLASSIC2 1087 #define IDC_SKIN_WIN7 1088 #define IDC_STATICEDGE2 1089 +#define IDC_STATICROWS 1090 +#define IDC_EDITROWS 1091 #define IDD_CUSTOMMENU 3001 #define IDS_APP_TITLE 3001 #define IDD_SKINSETTINGS 3002 @@ -788,6 +790,17 @@ #define IDS_ALT_ACCELERATORS_TIP 3689 #define IDS_BUTTON_OFFSET 3690 #define IDS_BUTTON_OFFSET_TIP 3691 +#define IDS_SECOND_PANE 3692 +#define IDS_SECOND_PANE_TIP 3693 +#define IDS_SECOND_PANE_LAST 3694 +#define IDS_SECOND_PANE_LAST_TIP 3695 +#define IDS_SECOND_PANE_NONE 3696 +#define IDS_SECOND_PANE_NONE_TIP 3697 +#define IDS_SECOND_PANE_FIRST 3698 +#define IDS_SECOND_PANE_FIRST_TIP 3699 +#define IDS_PINNED_ITEM 3700 +#define IDS_PINNED_ITEM_TIP 3701 +#define IDS_ROWS_TIP 3702 #define IDS_STRING7001 7001 #define IDS_STRING7002 7002 #define IDS_STRING7003 7003 @@ -852,7 +865,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 126 #define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1090 +#define _APS_NEXT_CONTROL_VALUE 1092 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif