- Use TBSTATE_PRESSED, our checked graphic isn't too pretty

- reduce desktops to 2 to save some taskbar space
- switch the icon back to the original one. It suits the tango set much better.

svn path=/trunk/; revision=36644
This commit is contained in:
Ged Murphy 2008-10-04 13:19:23 +00:00
parent 0c0a645911
commit ffa9230be9
4 changed files with 4 additions and 6 deletions

View file

@ -235,7 +235,7 @@ typedef Desktop DesktopRef;
#endif
#define DESKTOP_COUNT 4
#define DESKTOP_COUNT 2
struct Desktops : public vector<DesktopRef>
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View file

@ -427,9 +427,7 @@ int DesktopBar::Command(int id, int code)
break;
case ID_SWITCH_DESKTOP_1:
case ID_SWITCH_DESKTOP_1+1:
case ID_SWITCH_DESKTOP_1+2:
case ID_SWITCH_DESKTOP_1+3: {
case ID_SWITCH_DESKTOP_1+1: {
int desktop_idx = id - ID_SWITCH_DESKTOP_1;
g_Globals._desktops.SwitchToDesktop(desktop_idx);

View file

@ -150,7 +150,7 @@ void QuickLaunchBar::AddShortcuts()
SelectBitmap(hdc, hbmp_old);
AddButton(ID_SWITCH_DESKTOP_1+i, hbmp, FmtString(desktop_fmt, i+1), NULL, cur_desktop==i?TBSTATE_ENABLED|TBSTATE_CHECKED:TBSTATE_ENABLED);
AddButton(ID_SWITCH_DESKTOP_1+i, hbmp, FmtString(desktop_fmt, i+1), NULL, cur_desktop==i?TBSTATE_ENABLED|TBSTATE_PRESSED:TBSTATE_ENABLED);
}
DeleteDC(hdc);
@ -199,7 +199,7 @@ void QuickLaunchBar::AddButton(int id, HBITMAP hbmp, LPCTSTR name, Entry* entry,
void QuickLaunchBar::UpdateDesktopButtons(int desktop_idx)
{
for(int i=0; i<DESKTOP_COUNT; ++i) {
TBBUTTONINFO tbi = {sizeof(TBBUTTONINFO), TBIF_STATE, 0, 0, desktop_idx==i? TBSTATE_ENABLED|TBSTATE_CHECKED: TBSTATE_ENABLED};
TBBUTTONINFO tbi = {sizeof(TBBUTTONINFO), TBIF_STATE, 0, 0, desktop_idx==i? TBSTATE_ENABLED|TBSTATE_PRESSED: TBSTATE_ENABLED};
SendMessage(_hwnd, TB_SETBUTTONINFO, ID_SWITCH_DESKTOP_1+i, (LPARAM)&tbi);
}