Manage Skins: Fixed that Position is not saved permanently (reset if skin is refreshed)

This commit is contained in:
Birunthan Mohanathas 2011-09-30 16:49:49 +00:00
parent 2efc79bf0c
commit 6594246bf4
3 changed files with 19 additions and 11 deletions

View File

@ -1081,7 +1081,7 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam)
{ {
m_IgnoreUpdate = true; m_IgnoreUpdate = true;
ZPOSITION zpos = (ZPOSITION)(ComboBox_GetCurSel((HWND)lParam) - 2); ZPOSITION zpos = (ZPOSITION)(ComboBox_GetCurSel((HWND)lParam) - 2);
m_SkinWindow->ChangeZPos(zpos); m_SkinWindow->SetWindowZPosition(zpos);
} }
break; break;

View File

@ -3612,28 +3612,23 @@ LRESULT CMeterWindow::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam)
} }
else if (wParam == ID_CONTEXT_SKINMENU_VERYTOPMOST) else if (wParam == ID_CONTEXT_SKINMENU_VERYTOPMOST)
{ {
ChangeZPos(ZPOSITION_ONTOPMOST); SetWindowZPosition(ZPOSITION_ONTOPMOST);
WriteConfig(SETTING_ALWAYSONTOP);
} }
else if (wParam == ID_CONTEXT_SKINMENU_TOPMOST) else if (wParam == ID_CONTEXT_SKINMENU_TOPMOST)
{ {
ChangeZPos(ZPOSITION_ONTOP); SetWindowZPosition(ZPOSITION_ONTOP);
WriteConfig(SETTING_ALWAYSONTOP);
} }
else if (wParam == ID_CONTEXT_SKINMENU_BOTTOM) else if (wParam == ID_CONTEXT_SKINMENU_BOTTOM)
{ {
ChangeZPos(ZPOSITION_ONBOTTOM); SetWindowZPosition(ZPOSITION_ONBOTTOM);
WriteConfig(SETTING_ALWAYSONTOP);
} }
else if (wParam == ID_CONTEXT_SKINMENU_NORMAL) else if (wParam == ID_CONTEXT_SKINMENU_NORMAL)
{ {
ChangeZPos(ZPOSITION_NORMAL); SetWindowZPosition(ZPOSITION_NORMAL);
WriteConfig(SETTING_ALWAYSONTOP);
} }
else if (wParam == ID_CONTEXT_SKINMENU_ONDESKTOP) else if (wParam == ID_CONTEXT_SKINMENU_ONDESKTOP)
{ {
ChangeZPos(ZPOSITION_ONDESKTOP); SetWindowZPosition(ZPOSITION_ONDESKTOP);
WriteConfig(SETTING_ALWAYSONTOP);
} }
else if (wParam == ID_CONTEXT_SKINMENU_KEEPONSCREEN) else if (wParam == ID_CONTEXT_SKINMENU_KEEPONSCREEN)
{ {
@ -3867,6 +3862,18 @@ void CMeterWindow::SetWindowHide(HIDEMODE hide)
WriteConfig(SETTING_HIDEONMOUSEOVER); WriteConfig(SETTING_HIDEONMOUSEOVER);
} }
/*
** SetWindowZPosition
**
** Helper function for setting Position
**
*/
void CMeterWindow::SetWindowZPosition(ZPOSITION zpos)
{
ChangeZPos(zpos);
WriteConfig(SETTING_ALWAYSONTOP);
}
/* /*
** OnSysCommand ** OnSysCommand
** **

View File

@ -330,6 +330,7 @@ private:
void SetSavePosition(bool b); void SetSavePosition(bool b);
void SetSnapEdges(bool b); void SetSnapEdges(bool b);
void SetWindowHide(HIDEMODE hide); void SetWindowHide(HIDEMODE hide);
void SetWindowZPosition(ZPOSITION zpos);
bool DoAction(int x, int y, MOUSE mouse, bool test); bool DoAction(int x, int y, MOUSE mouse, bool test);
bool DoMoveAction(int x, int y, MOUSE mouse); bool DoMoveAction(int x, int y, MOUSE mouse);
bool ResizeWindow(bool reset); bool ResizeWindow(bool reset);